Developer forum

Forum » Templates » ParentTag in RenderNavigation (PageViewModel)

ParentTag in RenderNavigation (PageViewModel)

Lars Larsen
Lars Larsen
Reply

Hi

I am trying to render a menu using ParentTag like this:

@RenderNavigation(new
{   
    StartLevel = 1,
    EndLevel = 2,
    ParentTag = "Topmenu",
    Template = "TopNavigation.xslt"
})

But the systems seems not to take ParentTag into consideration. Nothing is rendered. What can I be missing?


Replies

 
Nicolai Pedersen
Reply

Looks right - where is the page with parenttag with topmenu located? Is it below level 1 or 2?

 
Lars Larsen
Lars Larsen
Reply

Hi Nicolai

The page with the parenttag is a folder (not a page) which is located in the root of the page structure. 

 
Nicolai Pedersen
Reply

Try making it page and see if that makes a difference. I think folders are marked as "do not show in navigation"

 
Lars Larsen
Lars Larsen
Reply

Seems like the problem was more pages having a value of "Topmenu" in the field "PageNavigationTag"!! Cleaning up made it work finally.

 

You must be logged in to post in the forum