0

This is confusing and not sure why it is happening. I do not commonly use Structure, so apologize in advance if this is a duh!

I have this tag:

{exp:structure:nav add_level_classes='yes' show_depth='2' start_from="shareholders"}

When on any page of the site it shows 2 levels. However when in the actual section that this nav is showing the links to, I get depth of 3. It is almost appears it is pulling them dynamically because if you click on one of those pages you get only that item in the nav.

I didn't see anything in the docs about dynamic navs...

Structure version is: 3.3.8 EE version is: 2.5.5

Thanks.

2

I looks like your missing the / in the start_from parameter, this could be causing the issue. Also, add the max_depth parameter like Mark suggested if you want to cap the depth

{exp:structure:nav add_level_classes='yes' show_depth='2' start_from="/shareholders"}
|improve this answer|||||
  • Unfortunately that did not fix it. Same Results. – Parscale Jun 20 '13 at 19:32
  • That's odd; start_from really ought to fix it even if it's not dynamically setting the parent for some reason. What version of Structure are you using? This sounds like a bug; you might want to get ahold of Jack. – adrienne Jun 20 '13 at 19:51
2

I solved the issue by adding max_depth="2". It appears that structure dynamically ignores the show_depth parameter when inside that section.

|improve this answer|||||
  • max_depth and show_depth get me every time, and I've been using Structure for years. – kmgdev Jun 20 '13 at 23:46
  • I always add both parameters to any Structure nav tag I have in my templates because it consistently causes issues like this if you don't. – Justin Long Jun 21 '13 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.