Navigation

Value Type Saved: List<NavigationItem>

The navigation content property allows you to create a navigation structure in a tree. This allows you to easily created multi level navigation structures. Saved as a List of Lists

If you pick content from the content tree, this will save the ID and the current name / url. If the url of the content item changes after this is selected, the old url is saved in the navigation. You need to use the saved content id to query the content to get the up to date url, or just use the extension method below that handles this all for you.

Example of getting value on page

Because we need to deal with items that have picked content, that content could have changed after it's been picked so we need to use this method to make sure we get up to date content urls, and this is why Mediator needs to be passed in.

@inject IMediator Mediator
@(await Model.NavigationItems("PropertyAliasHere", Mediator))

Last updated