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.

URL Structure and Template Groups

July 31, 2012 3:21pm

Subscribe [2]
  • #1 / Jul 31, 2012 3:21pm

    helbnt

    143 posts

    I’m sure this has been answered, but my searching skills seem horribly lacking at the moment.

    I currently have a site dedicated to Harley Davidson. I have a section for the various motorcycles (natch). Currently my template structure is like this:

    Template group: Bikes
    Templates under Bikes: Decade, Year and Index.

    This results in a url that looks like /bikes/decade/1910-1920 (which showcases the motorcycles from that decade) and when I select a particular bike, the url looks like /bikes/year/1907_7d (for example).

    It seems I should be able to simplify that a bit. I’m looking to move it to /bikes/1910-1920/, removing the decade all together. And…not quite sure how to showcase the individual bike yet.

    Do I need to create a template for every decade under bikes? So my template structure would look like:

    Bikes
      >1910-1920
      >1920-1930
      >1930-1940
    etc…

    It seems if I want the URL structure I would need to do something like that, but it doesn’t seem very intuitive to me either.

    Any thoughts?

     

  • #2 / Aug 01, 2012 8:06am

    Boyink!

    5011 posts

    One approach is to handle it all within the index template:

    http://eeinsider.com/articles/simpler-expressionengine-urls-with-a-simple-template/

  • #3 / Aug 01, 2012 1:39pm

    helbnt

    143 posts

    Thanks Mike - I *think* that’ll do what I need.

    Is there a way to make Switchee work with three different templates?

    I’m trying to get my url to look like /bike/index.php OR /bike/1910-1920 OR /bike/1903_single. Basically a landing page, bikes available in the decade, and then a detailed view of a particular bike in that decade.

    Does that make sense?

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

ExpressionEngine News!

#eecms, #events, #releases