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.

Updating from 1.6.8 to EE2 - templates saved as flat files - documentation unclear

April 02, 2011 4:24pm

Subscribe [2]
  • #1 / Apr 02, 2011 4:24pm

    walpow

    133 posts

    This question may be related to a resolved thread.

    The thread above is in the ballpark, but not exactly my question. (Although it does mention an update to the docs, which as far as I can tell never happened.)

    I’m about to upgrade my one and only EE site from 1.6.8 to EE2. My templates are saved as flat files. I edit them in Dreamweaver, and I moved them out of the system directory because I found it easier to work with them there. So on my template preferences in the control panel, the basepath to template file directory is /templates/ under the root of the site, rather than, for example, /system/templates/.

    Does the following still apply, only with my /templates/ directory instead of /system/templates/?

    upload the contents of your 1.x system/templates/ directory to system/expressionengine/templates/<site_short_name>/

    And does this mean that with EE2 I’ll have to have my templates under the system directory, or will it pick up the current setting and expect them to be where they are now?

    Also, a post in the thread above or a similar one implied that the <short_site_name> had to be default_site. Is that true?

    Thanks,
    Nathan

  • #2 / Apr 04, 2011 8:46am

    Sue Crocker

    26054 posts

    Hi, walpow.

    During the conversion process, place them in the /system/templates/default_site directory. Leave your other template alone.

    What I did was keep my edit folder, and once I re-saved the templates, it wrote the EE2.x template structure over to my edit folder.

    See the attached screenshot.

    Yes, you need to use default_site for the short name.

  • #3 / Apr 04, 2011 12:26pm

    walpow

    133 posts

    I’m afraid this isn’t clear to me.

    During the conversion process, place them in the /system/templates/default_site directory. Leave your other template alone.

    When you say “during the conversion process,” do you mean as a preliminary step before the actual conversion? That’s what I did when I tried the update yesterday. (It was a disaster.)

    And do you mean /system/expressionengine/templates/default_site? That’s what the docs say.

    What I did was keep my edit folder, and once I re-saved the templates, it wrote the EE2.x template structure over to my edit folder.

    Does this mean copies in the original location as well as the new one referenced above, and then, after the conversion, I go in to each template and re-save it, and it will remember my template location from 1.X?

    Thanks,
    Nathan

  • #4 / Apr 04, 2011 12:54pm

    Sue Crocker

    26054 posts

    You’re right, I didn’t type in the correct path. After you finish converting from 1.x to 2.x, the folder in the /system/expressionengine/templates/default_site folder turn into 1.x_templates

    Yes, you’ll end up with 1.x templates in two places:

    Your original /edit directory
    -and-
    /system/expression/engine/templates/1.x_templates

  • #5 / Apr 04, 2011 1:36pm

    walpow

    133 posts

    And where are the 2.X templates? And, again, after the conversion, do I go in to each template and re-save it, and it will remember my template editing location from 1.X and put 2.X versions there? I’m sorry, but this really isn’t clear in the docs (and perusing the forum tells me I’m not the only one to find it so).

    Thanks,
    Nathan

  • #6 / Apr 04, 2011 1:42pm

    Sue Crocker

    26054 posts

    Your EE2 templates will go into your /edit folder (or whatever you named your folder.)

    I only had edited one of my template groups for this example. It’s called editme.

    See the purple box around the attached image? That’s my EE2 template.

    the other folder for editme is my 1.x templates.

  • #7 / Apr 05, 2011 3:02pm

    walpow

    133 posts

    I feel like I’m getting information that circles around what I’m looking for, but never quite lands. I’ve asked specifically, twice, do I go in to each template and re-save it, and it will remember my template editing location from 1.X and put 2.X versions there?

    Did you make the default_site folder shown in your image before running the install program (in addition to the one in /system/expressionengine/templates/), or was it created by the install, or was it created afterward by resaving the templates or some other action?

    The basic question is this: does the install program pick up where I’ve been working on my 1.X templates from, based on the setting in the control panel, and create 2.X templates within that folder? Or does it merely create them inside the folder I create prior to the install (in /system/expressionengine/templates), requiring me to do something after the install to put them where I’ve been working from them?

    Thanks,
    Nathan

  • #8 / Apr 05, 2011 3:22pm

    Sue Crocker

    26054 posts

    Let’s break this down further.

    I feel like I’m getting information that circles around what I’m looking for, but never quite lands. I’ve asked specifically, twice, do I go in to each template and re-save it, and it will remember my template editing location from 1.X and put 2.X versions there?

    If you go into your templates and re-save them, EE will look up the EE2 settings for the path, and make or update the appropriate folders and files.

    In my test example, I had a 1.x template group called editme. It is in the /edit folder at the root of my site.

    In the 1.x version of templates, a folder called editme was created and the file index.php is the index template.

    Upgraded to 2.x.

    After upgrading, I edited the editme/index template again and saved it.

    EE2.x created a folder called default_site (you can’t change that easily) and another folder called editme.group. Inside of the editme.group folder, it created an index.html file (which is the same as the editme/index template in EE2.

    So now if I wanted to make a new template group called helpme, I would get a folder called /edit/helpme.group/index.html

    See how that works?

    Did you make the default_site folder shown in your image before running the install program (in addition to the one in /system/expressionengine/templates/), or was it created by the install, or was it created afterward by resaving the templates or some other action?

    No, I did not make any additional folders. EE2.x made that for me once I saved my first template as a file.

    I DID have to make the default_site folder by hand in the /system/expressionengine/templates folder, and copy over my 1.x folder structure.

    The basic question is this: does the install program pick up where I’ve been working on my 1.X templates from, based on the setting in the control panel, and create 2.X templates within that folder? Or does it merely create them inside the folder I create prior to the install (in /system/expressionengine/templates), requiring me to do something after the install to put them where I’ve been working from them?

    The install program picks up where you were working previously. I’m not in front of the computer I installed on to get an accurate answer on this point.. but do the others make sense?

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

ExpressionEngine News!

#eecms, #events, #releases