hierarchical viewer for secondary navigation

Celero Solutions asked on April 30, 2014 12:12

Hello, I have built a secondary navigation that displays pages only at the 3 & 4th level. A user would select a page under the main navigation (which displays 0, 1 and 2 levels) and then depending on what they pick at the 2 level, that page should display the 3 and 4 level options for that section. I have this working but it displays all of the 3 and 4 level pages for all sections of the site. I'm not sure how to make it only display the 3 and 4 level pages for that specific parent.

I think this might have to do with the "WHERE condition" field in the webpart... I currently have this line in there to display only pages marked to show in navigation "(DocumentMenuItemHideInNavigation = 0) OR (DocumentMenuItemHideInNavigation IS NULL)"... what do I need to add to specify that it only displays the child pages (3 and 4 levels) of the parent page (2 level) they've selected?

Let me know if you need any other specifics...

Any help is appreciated.

Recent Answers

Jaroslav Kupcik answered on May 27, 2014 03:52 (last edited on December 10, 2019 02:30)

I usually use the hierarchical viewer for displaying all the data and manage its visibility via CSS and JS based on user actions. If you want to do this at server side, you can probably use WHERE condition like this: (NodeLevel <> 3 AND NodeLevel<>4) OR (NodeParentID = {% CurrentDocument.DocumentID |(identity)GlobalAdministrator%})) The condition hides the items on 3rd and 4th level unless their parent or grand-parent is currently displayed document.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.