ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

What is the difference between template locations?

January 26, 2011 2:54pm

Subscribe [4]
  • #1 / Jan 26, 2011 2:54pm

    davey

    27 posts

    Hi everyone -

    Can someone explain the difference between saving templates in these two locations?

    /system/expressionengine/templates directory

    or

    /themes/sitethemes/(mysitename)/(templategroupshere)

    It seems like the second is the more logical place to keep everything together based on example sites I have seen or the example that ships with EE2.

    I am understanding that to use an external code editor you have to manually save out your templates or create a dummy empty one each time then open it up via ftp via your external codeeditor, input your code and then save it back…

    So, in essence trying to understand how when using a codeeditor, how does a template end up in the theme folder in the templategroup or does it just not matter or what is the best practice for this use of an external editor?

    I tried looking into Editee but that seems cumbersome though maybe helpful for spot issues when in the CP…


    thanks,

    David

  • #2 / Jan 26, 2011 3:34pm

    Tony Geer

    253 posts

    You can save your template files wherever is most convenient to you, it doesn’t really matter. To use an external code either you can easily create your template files inside of your template directory, and it will automatically be detected in EE. If you already have existing templates that were created in EE, then you can simply open it up and then check off Save Template as File (once this setting is enabled) and it will save it out to a file and then you can continue editing it with your editor of choice. Hope this helps.

  • #3 / Jan 26, 2011 4:44pm

    davey

    27 posts

    Cool thanks, that helps and confirms the best route to work. Thanks.

    In terms of the templates that end up in /themes/sitethemes/(mysitename)/(templategroupshere) are those the same as the templates I would create and then edit in CP or in external codeeditor, or am I misunderstanding the difference between the two locations conceptually?

  • #4 / Jan 26, 2011 5:15pm

    Tony Geer

    253 posts

    I think those templates are from some themes that you can install with a fresh install of EE, but I’ve never done that. I store my templates in the root for quick access, but some people store them above the root for extra security.

  • #5 / Jan 26, 2011 5:19pm

    davey

    27 posts

    ok, cool thanks a bunch in clarifying that…

  • #6 / Jan 26, 2011 5:21pm

    BigCItyShelts

    35 posts

    Root here, too.  For the convenience.

  • #7 / Jan 27, 2011 10:28am

    Sue Crocker

    26054 posts

    Thanks for the assist, Tony.

    The site_themes folder is where the agile_records theme is for use during the install process. I also use that folder to hold my own site assets, particularly if I want to fiddle with more than one design.

    Does that help?

  • #8 / Jan 27, 2011 10:41am

    Tony Geer

    253 posts

    Here’s a recent discussion on workflow that you may also find interesting David.

  • #9 / Jan 27, 2011 3:00pm

    davey

    27 posts

    It does help indeed. I am really trying to grasp the hows and whys here - like why did they use site_themes for the install of the agile_records demo site? vs. showing how to properly use /templates in root? Was it merely a security thing?

    Further, is it correct to think a template is not always part of a theme? and/or do themes always have templates? Goes back to age old question in any of our new fangled web-dev offerings - does theme just mean skinning? or is it actually something more involved? The answers I am looking for are what did Ellis think when they designed and evolved EE?

    And Sue, do you use that folder to fiddle with designs because it is easier or better or faster or safer or easier to allow toggling of the design without interfering with the more integrated templates?

    Thanks Tony - I will have a look at that post, can you post the link, not seeing it 😉


    thanks everyone -

    David

  • #10 / Jan 27, 2011 3:14pm

    Tony Geer

    253 posts

  • #11 / Jan 28, 2011 3:55am

    John Henry Donovan

    12339 posts

    Thanks for the help Tony. Closing this one out. Feel free to start a new thread if you have any more questions

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases