Developer forum

Forum » CMS - Standard features » Nodes from NavigationTreeViewModel don't have the 'Show in breadcrumb trail' property

Nodes from NavigationTreeViewModel don't have the 'Show in breadcrumb trail' property

Mafalda Correa
Mafalda Correa
Reply

Hi,

I was doing some work on breadcrumbs and I wanted to honor the checkbox in the page 'Show in breadcrumb trail' to only show the page if the checkbox was on.

However, using the NavigationTreeViewModel it does not seem like I have access to that field in the node.

So I had to get the Page to get the ShowInLegend property from the page:

var page = Dynamicweb.Services.Pages.GetPage(node.PageId);
var showInBreadcrumb = page.ShowInLegend;

I believe we should be able to access the property in the node, just like we can access IsActive and IsClickable.


Replies

 
Suzi Louring
Reply

+1

 
Claus Kølbæk
Claus Kølbæk
Reply

+1 And .IsFolder preferably - also include folders by default, and let us remove them from the list in  the end. (That will also solve the current sitemap issue on swift)

 

You must be logged in to post in the forum