dynamic conditional navigation

Neil Fennessey asked on December 11, 2014 05:45

Right now you have navigation based on the subdirectory of a page. Is there a way to do conditional logic for navigation? Let's say you are logged in and you want under the navigational element to change because you are logged in. Thoughts?

Correct Answer

Brenden Kehren answered on December 12, 2014 08:54

Sorry Neil, must have misunderstood what you were looking for. You can set a macro in the path or any other property based on your conditions to hide or show or even filter the dataset. For example CurrentDocument.NodeAliasPath.Contains("/About")

0 votesVote for this answer Unmark Correct answer

Recent Answers


Adam Jackman-Moore answered on December 11, 2014 08:07

Go to the security tab of your page and set page User / Roles and Access rights.

Then on your menu web part ( We use CSS List Menu) tick the box System Settings > Check Permissions.

Then only menu options the current user is configured for will show.

1 votesVote for this answer Mark as a Correct answer

Neil Fennessey answered on December 11, 2014 17:24

Hi - okay that's a good answer to the question I asked but I should have given a different example of dynamic navigation.

Go to a foo.com and the navigation reads a drop down say "available cities" with six cities including new york. Now go to foo.com/newyork and the available cities no longer has newyork but instead the five other cities the site supports. In effect, you need the navigation to not include newyork as it is now in the URL.

Another example - login to a site and you see a navigation that's specific to certain characteristics of the experience of the user. Go to New York and the navigation shows navigational elements specific to services in new york. Different when you go to Chicago.

Somehow/someway you need to trigger the navigation to be different based on some conditional logic. Thoughts?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 11, 2014 23:31

To add what Adam already suggested, you can use the CSS List Menu or any other web part for that matter and set the Show for property to be authenticated users. Or a list of your roles that people are in.

0 votesVote for this answer Mark as a Correct answer

Neil Fennessey answered on December 12, 2014 00:11

Hi - has nothing to do with any sort of authentication. Has to do with conditional navigation based on something perhaps in the URL or even due to a session variable. Thanks!

0 votesVote for this answer Mark as a Correct answer

Neil Fennessey answered on December 12, 2014 15:54

Oh THAT is a major help. I've wondered about that before. Thanks so much.

0 votesVote for this answer Mark as a Correct answer

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