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.

How can I build a site with content that is fairly deep

March 27, 2014 1:37pm

Subscribe [2]
  • #1 / Mar 27, 2014 1:37pm

    lamaison

    15 posts

    I need to build a site (my first with ee) that have fairly deep content structure.

    Breadcrumbs would look like
    Home / Solutions / Solution Group Name / Individual Solution

    URL would look like
    domain.com/solutions/solution-group-name/solution-name

    Thanks for your help.

  • #2 / Mar 27, 2014 6:05pm

    Boyink!

    5011 posts

    Have you reviewed the docs around EE’s URL structures?

  • #3 / Mar 27, 2014 6:50pm

    lamaison

    15 posts

    I get the basic concepts of

    http://example.com/index.php/template_group/template

    But I’m confused on “Up to 9 URL segments can be accessed ...”

    And now with “Template Routes overrides the default behavior of URLs” 

    I’m very confused.

  • #4 / Mar 28, 2014 8:17am

    Boyink!

    5011 posts

    http://ellislab.com/expressionengine/user-guide/urls/url_structure.html

    Template routes are brand new, and in 10 years of working with EE would have had a need for them maybe 1 or 2 times. For the urls you propose the standard EE URL structure will suffice.

    Your “Access 9 segment” quote is for segment variables. EE won’t generate URLs that long but you can artificially add segments and access them using the variables if need be.

  • #5 / Mar 31, 2014 1:48pm

    lamaison

    15 posts

    Thanks so much for your help thus far.

    Is this the basic idea on how to achieve a structure like

    http://example.com/solutions/solution-group-name/individual-solution-page


    1. http://example.com/solutions (Main Solutions Page)

    -Use solutions/index template
    -No segment_2 and no segment_3

    2. http://example.com/solutions/solution-group-name (Solution groups)

    http://example.com/solutions/solution-group-name...

    -Use solutions/index template
    -Use segment_2 and no segment_3 to display solution group pages

    3. http://example.com/solutions/solution-group-name/individual-solution-page

    -Use solutions/index template
    -Use segment_3 variable to display 1 of 30 solution pages


    Thanks again for your help

  • #6 / Mar 31, 2014 1:57pm

    Boyink!

    5011 posts

    Thanks so much for your help thus far.

    Is this the basic idea on how to achieve a structure like

    http://example.com/solutions/solution-group-name/individual-solution-page


    1. http://example.com/solutions (Main Solutions Page)

    -Use solutions/index template
    -No segment_2 and no segment_3

    Correct - in that case EE will look for a /solutions/ template group and load the index template in it.

    2. http://example.com/solutions/solution-group-name (Solution groups)

    http://example.com/solutions/solution-group-name...

    -Use solutions/index template
    -Use segment_2 and no segment_3 to display solution group pages

    In this case EE will first assume you have a template named /solution-group-name/ in the /solutions/ template group.

    If it doesn’t find one it will load the /solutions/index template. If you don’t want a template named /solution-group-name/ then EE will leave the next steps up to you. You could have that logic in your /index/ template - basically checking for something in the segment_2 position and handling it appropriately.

    3. http://example.com/solutions/solution-group-name/individual-solution-page

    -Use solutions/index template
    -Use segment_3 variable to display 1 of 30 solution pages

    Thanks again for your help

    Again, EE will want to assume that you have a /solutions/ template group, a template named /solution-group-name/, and now want to load an entry with the url_title of /individual-solution-page/. If this were the case EE would read the URL dynamically and pull the content based on the url_title in the segment_3 position.

    This is how EE wants to work, but you can work against it.  Again you would just build more logic into the solutions/index template.  Just keep in mind that when you add other things that can affect the URL structure (categories, pagination, date archives) etc it gets harder and harder to keep that one index template coded to handle all of of those situations plus accurately 404’ing when it needs to.

    Then of course there are template routes now in EE - I haven’t used them but they might alleviate some of the template complexity you might be generating here.

  • #7 / Mar 31, 2014 3:10pm

    lamaison

    15 posts

    Yea, I need to look into upgrading so I can try the Template Routes

    Thanks again.

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

ExpressionEngine News!

#eecms, #events, #releases