-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split blueprints for forms #204
Comments
Closing as it a duplicate of #164 |
But that's about form submissions, not the form blueprint. |
You can have all blueprints in the database or all in file. There is no distinction between the type of blueprint. |
Yeah, that's the point. We'd like to split that so we can version control the blueprints of collections, globals, etc and have the form blueprints in the database as that's more like content. |
Yep I understand - thats not currently possible. I'll open this back up, but being honest I'm not sure if/how it could be done. |
Just to keep track of it and maybe see if other users want this as well. If we find some time we'll dig into this further. |
With recent Statamic versions there is a separate permission for form blueprint editing to regular blueprint editing. Does this solve the problem for you? |
That's nice but we also need that separation here: https://github.com/statamic/eloquent-driver/blob/master/config/eloquent-driver.php#L19-L23 so form blueprints can be stored in the database and all others can stay in file. |
I don't think that's something this driver should support. That said, you could do it by binding your own BlueprintRepository and amending the in() method to check for file by default, and use eloquent if the namespace is form.
|
I'll dig into this soon, so a PR won't be accepted? |
I dont really see it that form blueprints are 'content' - to me the submissions are content, and forms are similar to collections. We've given the ability to have a split config on each repository, but within a repository itself seems quite niche. So to answer your question I'd be leaning towards no, but I'm open to being convinced. It may also be that this driver isnt the right place for it as it may be better as a standalone add-on for those that want that level of flexibility. |
@royduin just in case you didnt get notified, it's now supported in v4.3.0 as it was requested by someone else. I guess I was wrong and people do want it to work like this! |
Currently we did set the blueprints driver to "file" and disable the permissions to change them on all environments (through https://github.com/justbetter/statamic-environment-permissions) so the end user can not make blueprint changes. This is great as the customer should not make any blueprint changes to collections, taxonomies, globals, etc as changing it could case the frontend to break. And if the customer wants to add something; that should probably be visible at the frontend so a developer is needed to handle it. But.. a form blueprint is more like content.
We made it dynamic with: https://github.com/rapidez/statamic/blob/master/resources/views/page_builder/form.blade.php so the customer should be able to create their own forms.
Can we split this? So form blueprints are stored in the database and the rest in a file? Probably something with permissions also need to change within Statamic itself?
The text was updated successfully, but these errors were encountered: