When building breadcrumb two different levels get the same node.Level value
I have this weird problem. I'll try to explain.
I'll start with my site's content tree:
Content
- Home
- Second
- Third
- Fourth
- Fourth
- Third
- Fourth
- Second
- Third
- Third
- Fourth
- Fourth
- Fourth
- Fifth
- Fifth
- Second
- Second
The razor code in breadcrumb.cshtml:
@inherits umbraco.MacroEngines.DynamicNodeContext
@foreach(var node in Model.Ancestors().Where("Visible"))
{
@node.Name (@node.Level>
}
@Model.Name (@Model.Level)
This is a very simple breadcrumb navigation.
The problem is that this outputs as the following:
Home(1)
Second(2)
Third(2)
Fourth(3)
See the problem?
I output the level after the name, and i get level (2) for both the second and third items.
Some more info:
umbraco v 4.11.1 (Assembly version: 1.0.4715.27659)
When building breadcrumb two different levels get the same node.Level value
I have this weird problem. I'll try to explain.
I'll start with my site's content tree:
The razor code in breadcrumb.cshtml:
@foreach(var node in Model.Ancestors().Where("Visible")) {-
@node.Name (@node.Level>
}
-
@Model.Name (@Model.Level)
This is a very simple breadcrumb navigation.
The problem is that this outputs as the following:
See the problem?
I output the level after the name, and i get level (2) for both the second and third items.
Some more info:
is working on a reply...