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.

Template Organization

August 26, 2008 11:55am

Subscribe [4]
  • #1 / Aug 26, 2008 11:55am

    Todd D.

    460 posts

    I have read in several places here on the forums and elsewhere that many people like to use one template group per website section.

    This way they can get URL’s that look like

    http://www.example.com/index.php/about/
    http://www.example.com/index.php/products/

    etc…

    I setup all my templates in the default site group and can still pull those URLs.  I’m not using any mod_rewrite stuff either. Did EE change the way it did things or is something fishy going on here?

  • #2 / Aug 26, 2008 12:16pm

    Ingmar

    29245 posts

    No, nothing fishy. EE is smart enough to show you

    http://www.example.com/index.php/site/about/ and
    http://www.example.com/index.php/site/products/

    ... even when you leave out the default template group (“site” in this example). Not necessarily recommended, though: there’s bound to be a problem when you have a template group and a template by the same name in the default group…

  • #3 / Aug 26, 2008 12:22pm

    stinhambo

    1268 posts

    Basically you can have the whole site in one template (wow!), use the path variables to create URLs then use segment variables to change the behaviour. It really is a great system and a cool way to create multi layered sites despite the initial look of only being able to go to 2 or 3 levels.

  • #4 / Aug 26, 2008 1:13pm

    Todd D.

    460 posts

    Thanks for the quick replies. I’m going to use the one template group per site section method instead and take the time to switch things over in order to avoid any issues in the future.

  • #5 / Sep 06, 2008 3:40pm

    grrramps

    2219 posts

    Thanks for the quick replies. I’m going to use the one template group per site section method instead and take the time to switch things over in order to avoid any issues in the future.

    That’s probably a good way to start. For most sites I manage I start off with two Template Groups. The ‘site’ and ‘search’. Then I add as needed; either another important section to the site, or another Template Group just for advertising embeds (works wonderfully with OpenX ad server).

    From the standpoint of EE’s template groups, templates, categories, and segments, the only real difficulty I’ve run into is keeping it all organized simply enough so that I can remember where I put what and why.

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

ExpressionEngine News!

#eecms, #events, #releases