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.

Changing Site Default Theme

June 23, 2007 3:23am

Subscribe [3]
  • #1 / Jun 23, 2007 3:23am

    dshafer

    7 posts

    I’ve looked and cannot find anywhere this question is addressed, though I am absolutely certain it must have come up dozens of times. Maybe I just don’t know the search terms to use.

    I understand that the way EE uses templating, it isn’t possible to have a one-click switch for the default site theme. The question is: Is it even possible to change from one site template to another without simply editing the existing site theme and, if so, how does one go about it?

    I am ready to build a site but I’m not sure I have identified the best default site template. If I’m going to find it very difficult to back out of that decision, I’ll spend a lot more time on it up front. If, on the other hand, it’s fairly easy even if not trivial, to change it, I’ll worry a lot less about this issue.

    Thanks for your insights.

  • #2 / Jun 23, 2007 3:36am

    melissah

    25 posts

    I had no clue, so I asked CrimsonDawn. This is what he had to say:

    Well, with EE, there’s three primary ways to create templates.  Simply create a blank one,  duplicate an existing template, or create a new weblog and use one of the pre-mades for the option to automatically generate a template group and all templates for that site.

    Essentially, he could duplicate all his templates into as many template groups as he likes and apply any of the pre-mades to them after the fact, by copying and pasting.  Then, he would have to edit all of the template files to reflect his main weblog name and the new template group.  After that, he can then just change the main index page that displays in EE to any new group to change the look.

    I hope that makes sense.

  • #3 / Jun 23, 2007 4:04am

    Ingmar

    29245 posts

    Well, my advice is this: Don’t worry about it. Go for any theme, get some hands-on experience. See how it works, dissect it, if you will. Then modify the templates in any way you see fit. It’s really the only way if you want an even halfway individual site.

  • #4 / Jun 23, 2007 4:13am

    chrispiciullo

    69 posts

    The question is: Is it even possible to change from one site template to another without simply editing the existing site theme and, if so, how does one go about it?

    Is it possible? Yes.  Will it be time consuming? Most likely.  How does one go about doing it? Read Below 😊

    Since I had no idea that my horrid explanation was going to be copy and pasted as a reply, I think I should clarify what I meant.  First, a disclaimer: I am, by no means, an EE guru.  Even after using it for roughly 3 years, I still only know how to do what *I* need it to do.  What I say here may not be the only/best way to do things.  Rather, its only how I know how to do them.  That said, here we go. 😊

    First off, I missed a fourth method for creating a template, and this is probably the best way to handle it for what I think you’re looking to do.  When you’re creating a template from the Template Manager, EE allows you to “Use a template from your library.”  Basically, this allows you to create text files with a .tpl extension (.txt files don’t seem to work) and upload it to your /root/system/templates folder and create new templates using their content.  I’d advise creating a directory for each template group (for lack of a better set of words) and placing your .tpl files into their respective folders, just to keep things nice and organized.

    So, for instance, let’s pretend that you took the time to copy and paste all of the source from any one (or all, if that’s what you want) of the themes located on the Site Themes, pasted them into the properly named .tpl file, and uploaded all of the folders into your /root/system/templates folder, it might look something like this (bad diagram warning):

    root
    --system
      --templates
        --alexblue
          --index.tpl
          --comments.tpl
          --archives.tpl
          --etc
        --amaryllis
          --index.tpl
          --comments.tpl
          --archives.tpl
          --etc

    Whenever you go to create a new template, you could simply select the “Use a template from your library” option and your drop down list will be filled with all of the templates that you uploaded. 

    Regardless of which method you decide to use to create new template groups and their templates for each theme, once you have all the ones you like, you just have to go in and edit the information located at the top of each file to point to the proper weblog short name and template group name where asked.  After you do all that, there’s just one more step to “switch” between each template… similar to “one click theming” but requiring more than one click, heh.

    When you want to try out a different look, simply select the template group that you would like to show as the main theme, click on “Edit Group” and on the new screen, check the box marked “Make the index template in this group your site’s home page?” and click “Update.”

    Now that theme will be used to “skin” your site and provided you edited the info at the very top of the template, pull all the pertinent info from your weblog.  To get a new look, simple repeat the steps in the above paragraph.

    Personally, I agree with Ingmar.  Don’t worry about it.  Find a template that might look similar to what you want and dive right in.  Tear its guts out.  Break it then fix it.  More importantly, have fun with it.  That really is the best way to learn the in’s and out’s.  If you get stuck, you’ve got this great forum to help you out when you need it.

    Sorry this is so long winded and possibly retarded.  It is very late and I’m a little loopy…

  • #5 / Jun 23, 2007 6:54pm

    dshafer

    7 posts

    Thanks to both of you for your excellent responses and pointers. I can see that ultimately I’m going to have to create my own theme anyway and since it appears that switching to a new theme as the site default is not a huge or impossible undertaking, then I’m perfectly happy to just dive in.

    Just so you know why I asked…. I’m very knowledgeable about CSS, having written a book on it and covered it since its inception for CNET and other sources. But I’m a horrible graphics designer. I’m talking “can’t-draw-a-straight-line-with-a-ruler” type guy who also wears mismatched socks if he’s left to his own devices. So I generally end up engaging a graphic designer at some point in my projects.

    Somehow I managed to miss the whole .tpl thing in learning EE the first time through. I’m going to give that a lot more study but it looks to me like the structure of that approach is pretty well thought out and that providing new files in those areas ought to be pretty straightforward.

  • #6 / Jun 23, 2007 7:32pm

    chrispiciullo

    69 posts

    I’m talking “can’t-draw-a-straight-line-with-a-ruler” type guy who also wears mismatched socks if he’s left to his own devices.

    Wait a minute… You mean lines have to be straight and socks have to match?  My whole world has just been thrown upside down…  😉

    I haven’t played with the .tpl files much for personal use, but I can definitely see the advantage for rapid creation/duplication of templates.  It is definitely something I’m going to look further into when I redesign, though.

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

ExpressionEngine News!

#eecms, #events, #releases