1

I have a site that uses structure, and has a structure navigation.

  • On the homepage, it shows all my top level nav items, which is correct.
  • On my /news-and-events/news page, which is a structure page that draws from the news-and-events.group/news template, it shows the top level pages and the news and events sub-pages in the nav, which is correct.
  • On /news-and-events/news/{url_title}, the nav shows only the top level items again, which is incorrect.

The individual news pages run off the same template as /news-and-events/news, just checks segment_3, and pull in content from a separate site within MSM, so they can't be a structure listing. I need a way to get these individual news pages to show the same nav as the news listing page, either through manipulating the structure nav tag or tricking it into thinking I'm still on the news page.

Any suggestions?

2
  • Post your {exp:structure:nav} code
    – Anna_MediaGirl
    Dec 12, 2013 at 0:27
  • It is, at the moment, literally just that. {exp:structure:nav} I haven't found any parameters that help with this use case. Dec 12, 2013 at 0:36

2 Answers 2

1

This code tells Structure Nav to always start at root and to show 2 levels of the tree all the time:

{exp:structure:nav start_from="/" max_depth="2"}

Structure Nav Docs:
http://www.buildwithstructure.com/tags/navigation/

2
  • Tried this and it did not work. Dec 12, 2013 at 1:05
  • What does {exp:structure:nav start_from="/{segment_1}/{segment_2}" max_depth="2"} do?
    – Anna_MediaGirl
    Dec 12, 2013 at 1:14
0
{exp:structure:nav start_from='/' max_depth="2" show_depth="2"}

Does adding show_depth help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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