We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Option to not save Template Variables as files.

Feature Requests

jaasum's avatar
jaasum
36 posts
9 years ago
jaasum's avatar jaasum

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.

       
Seth Barber's avatar
Seth Barber
172 posts
9 years ago
Seth Barber's avatar Seth Barber

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?

       
jaasum's avatar
jaasum
36 posts
9 years ago
jaasum's avatar jaasum

Here is my workflow:

  1. Develop my site locally, with templates saved as files.
  2. Towards the end of development identify misc snippets of text and move them into Template Variables.
  3. Deploy the site live, giving the client access to edit Template Variables should they need to.
  4. Make updates locally, and then push my code live (in which case the original values of my template variables are now pushed to the server, potentially overriding any changes made on the live database should the templates sync.)

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.

       
Seth Barber's avatar
Seth Barber
172 posts
9 years ago
Seth Barber's avatar Seth Barber

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.

       
jaasum's avatar
jaasum
36 posts
9 years ago
jaasum's avatar jaasum

Great, thanks for the quick response!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.