Developer forum

Forum » Development » Get Navigation Level.

Get Navigation Level.

Yasharth Tahiliani
Reply

Within Razor, is there any way of getting the Navigation level of the current page? I know that we can get the Title of the page by simply using title. Just trying to find out the same for the navigation level.

Thanks & Regards,

Yash.


Replies

 
Nicolai Høeg Pedersen
Reply

PageView.Current.Page.get_Value("PageLevel")

 
Yasharth Tahiliani
Reply

Thank you so much mate! :) 

 
Yasharth Tahiliani
Reply

Hey Nicolai, this doesn't seem to be working within a Razor Template.

Do we have something like @GetValue("Title") for PageLevel? 

Thanks,

Yash.

 
Nicolai Høeg Pedersen
Reply

Yes it works, but you probably need the entire namespace path:

@Dynamicweb.Frontend.PageView.Current().Page.get_Value("PageLevel")

 

You must be logged in to post in the forum