In my projects I use Template Variables as text snippets. This becomes things like one-off lines of texts, phone numbers, etc. To have these always saved as files is not ideal because I would expect some of these variables to be installation specific, not something that is rolled into the site’s codebase.
My feature request would be either a wholesale “Don’t save Template Variables as files” option or the ability to choose for each variable which one I would want as a file and which I wouldn’t.
I’m not immediately grasping the issue saving Template Variables as files presents. When they are not saved as files, they are saved in the database; when they are saved as files they are still saved in the database, the only behavior that changes is there is also a file on the file system so that they may be edited outside the CP and/or versioned with an SCM (should you wish).
I suspect there is something specific to how you develop a site that I’m overlooking. Could you walk me through your workflow?
Here is my workflow:
Before, in EE2, you had fine-tuned control over which templates were saved as files. Now it appears to be a global boolean for every type of template value to either save it as a file or not. In my use case described above I would never want template variables as files on the system, they are database specific values I would expect to be different between servers – exactly the same as channel entries, users, etc.
Basically, for the majority of my template variables I moved them there specifically because I didn’t want them as hard-coded files and now there is no option to remove that.
Thanks for sharing, that helped tremendously. I’ll bring this up to the team to consider adding settings for Template Partials and Template Variables being saved as files. In the meantime, if you can adjust your deployment routine to ignore the _partials/
and _variables/
directories you should be good-to-go.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.