We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Structure Module - Segment 4 quirk

Development and Programming

jaemie's avatar
jaemie
17 posts
15 years ago
jaemie's avatar jaemie

I just came across this today, and I’m not sure what’s going on.

This is what my sub navigation looks like when the url has three segments:

This is what my subnavigation looks like when the url has four segments:

I have no idea what is going on. I tried altering the limit_depth and show_depth with no luck. The navigation expands for each item only when the url has four segments … weird. I’m sure I’m missing something simple.

Here’s my code:

{exp:structure:nav_sub start_from="/{segment_1}" show_overview_link="yes" limit_depth="2"}

For a live view, you can see the site here: http://www.thelearninglamp.org/families/preschool/register/hyndman/

Any thoughts or suggestions would be greatly appreciated.

       
jaemie's avatar
jaemie
17 posts
15 years ago
jaemie's avatar jaemie

Because the site is live for the client, I made a temporary (hack) fix:

{if segment_4 == ""}                
{exp:structure:nav_sub start_from="/{segment_1}" show_overview_link="yes" limit_depth="2"}
{if:else}
{exp:structure:nav_sub start_from="/{segment_1}/{segment_2}" show_overview_link="yes" limit_depth="2"}
{/if}

Note, this is not what I intended for the navigation on the segment_4 pages. Instead, I wanted something like

Nav Level 2 Item A Nav Level 2 Item B Nav Level 2 Item C – Nav Level 3 Item A – Nav Level 3 Item B —- Nav Level 4 Item A —- Nav Level 4 Item A Nav Level 2 Item D Nav Level 2 Item E

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

You shouldn’t need the depth parameter as only children pages will be revealed as you drill down. Or am I not understanding something?

       
jaemie's avatar
jaemie
17 posts
15 years ago
jaemie's avatar jaemie

I want all of the navigation for /{segment_1}/ to show on all of that segment’s pages, but when a particular child has sub-navigation items it looks like this: http://www.thelearninglamp.org/families/after-school-programs/

However, when you get more than three segments in the URL, ALL of the other nav items “expand” like the image link in my first post.

       
jaemie's avatar
jaemie
17 posts
15 years ago
jaemie's avatar jaemie

Also, if I don’t put limit_depth, all of the items expand as they do when you reach a url with a segment_4.

I’m confused.

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

I see. This looks like a bug that was fixed a version or so ago. Are you running 2.0.7? I’d upgrade if not.

       
jaemie's avatar
jaemie
17 posts
15 years ago
jaemie's avatar jaemie

I must have missed an upgrade. I realize now that I had notifications turned off. (Duh!) I’ll try it out, but I’m sure that will solve the problem. Thanks, Travis!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.