I am using the code snippet for constructing a breadcrumb in razor from the umbraco reference site (have commented out the current page name to simplify results in this example) as I am new to Razor:
I am seeing what I would expect to which is a list built from the parent (Ancestor) of the current page, then the parent (Ancestor) of the that page and so on until there are no more parents (ancestors) to find, ie. the root of the site.
However I would prefer my list items to be in the opposite order (as a normal breadcrumb), then the @Model.Content.Name line can be uncommented to display the following breadcrumb
Razor breadcrumb script outputting in reverse
My current content structure is as follows:
I am using the code snippet for constructing a breadcrumb in razor from the umbraco reference site (have commented out the current page name to simplify results in this example) as I am new to Razor:
When I view the John page of my site my breadcrumb renders as follows:
I am seeing what I would expect to which is a list built from the parent (Ancestor) of the current page, then the parent (Ancestor) of the that page and so on until there are no more parents (ancestors) to find, ie. the root of the site.
However I would prefer my list items to be in the opposite order (as a normal breadcrumb), then the @Model.Content.Name line can be uncommented to display the following breadcrumb
Can somebody explain why my breadcrumb is not rendering as per other examples that use the same razor script?
Hi David,
Can you try this
Thats great Fuji, I did see an example on searching the internet but they had:
Which did not work as opposed to:
Thanks
Good if you got it working :)
Thank you Fuji.......
:)
is working on a reply...