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.

Using Templates with Nested URL's

February 16, 2012 10:06am

Subscribe [4]
  • #1 / Feb 16, 2012 10:06am

    Annodyne

    15 posts

    Hi All,

    I’m currently involved in my first EE2 build.  It’s made a disturbing amount of sense to me so far.  Very well done.

    One thing I’m still a little fuzzy about is template usage.  I was very pleased to learn that when creating a Page, the module allows you to specify the URL you want and select a default template for the entire module. So, in my case:

    standard/index

    When I nest Pages however, anything more than one url segment fails to load that template.  I get a page without styles.

    My goal here is to use standard/index for every page, even nested ones.  What would be my easiest solution?

    Cheers!

  • #2 / Feb 16, 2012 11:44am

    Kurt Deutscher

    827 posts

    Welcome to the EE community Annodyne,

    The user guide has a nice short section on EE’s URLs that would be the best place for you to start.

    EE is very flexible, and can be set up several ways, but everything comes back to EE default methods of how the URL’s should work. Once you understand those, then if you choose to branch out into some other system, you’ll have the foundation you need to understand what’s going on.

    Hope that helps.

  • #3 / Feb 16, 2012 12:48pm

    Annodyne

    15 posts

    Welcome to the EE community Annodyne,

    The user guide has a nice short section on EE’s URLs that would be the best place for you to start.

    EE is very flexible, and can be set up several ways, but everything comes back to EE default methods of how the URL’s should work. Once you understand those, then if you choose to branch out into some other system, you’ll have the foundation you need to understand what’s going on.

    Hope that helps.

    Perhaps a little more back story would help.  I’ve worked with codeigniter before and understand how the framework and ExpressionEngine handle URL’s.

    I’ve read the entire user guide.  I’m posting because none of it answered my question.

    Thanks!

  • #4 / Feb 16, 2012 1:37pm

    Kurt Deutscher

    827 posts

    My apologies,

    With a join date of Feb 2012 and only one post under this username, thought this was your first visit.

    Our firm doesn’t use the Pages Module for anything other than the occasional aliased URI (first segment only). Historically it just buggers things up when we attempted to use it for much else. There are folks out there that use it for most of their site though, so perhaps one of them can give us a clue how they are doing it.

    If I recall, the Pages Module does its work so early in the parsing order of EE that it can be difficult to pass variables within it soon enough for EE to see them. At least that’s what I remember.

    Good luck to you with your project.

  • #5 / Feb 16, 2012 1:49pm

    Annodyne

    15 posts

    Yes, I typically avoid clogging the forums if at all possible when working on something.  Couldn’t avoid it this time…

    Thanks for the info.  I’ll sit tight in hopes someone stumbles by with an idea.

    A small update on methods I’ve tried:

    - used {embed "standard/index"} on a “standard/sub-page” template
    - setting “standard/index” and “standard/sub-page” as the template explicity in the Pages tab of the entry

  • #6 / Feb 16, 2012 6:07pm

    Ian Young

    200 posts

    Generally I try to stick to dynamic contents as often as possible. If you’re going a couple of levels deep with Pages then it could be a good time to think about switching it to a Channel.

    If you do need to stick to Pages however then maybe give Page Helper a try. I’ve not used it before but it looks like it should provide the functionality you require.

  • #7 / Feb 16, 2012 6:14pm

    Ian Young

    200 posts

    Just incase you aren’t already, you’ll also need to set dynamic=“no” on your Channel Entries tag. The reason for this is because EE handles things dynamically based on the URL. If you’re setting static URLs for pages then you need to tell EE to ignore them and not try to process them based on the template_group/template pattern. Multiple segments on your page URLs should work.

  • #8 / Feb 17, 2012 8:40am

    Annodyne

    15 posts

    Thanks for the info Slippy.  I’ll try out the plugin and working with dynamic=“no”.

  • #9 / Feb 17, 2012 1:04pm

    Shane Eckert

    7174 posts

    Hello Annodyne,

    Slippy’s suggestions are dead on.

    You should be able to use pages and setting dynamic=“no” should help.

    Please let us know how that plugin works out. I have not used it yet.

    Cheers,

  • #10 / Feb 21, 2012 4:52pm

    Annodyne

    15 posts

    I’ve tested out Page Helper only to find that it doesn’t provide any change to the controller’s functionality as I would have hoped.  All it does is append two strings together for you when you’re creating a new page.  Quite useless unfortunately.

    UPDATE

    I’ve solved the problem.  It was all created by bad paths in my HTML.  Because of the additional URL segments, the right files failed to include themselves in the party and I got a blank page.  Pretty rookie mistake, but eh, it’s over with.  At least I walked away with a Page Helper accessory.

  • #11 / Feb 24, 2012 1:17pm

    Shane Eckert

    7174 posts

    Hello Annodyne,

    That’s right! If you walk away with more knowledge and tools, then it was totally worth the process.

    Thanks again for joining the community!

    Happy coding and happy Friday!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases