This is a recursive method and therefore the "Home" link will be added in each time the method is called, which is once for every set of child nodes. Probably the easiest way to not include it here, making minimal changes to your code, would be to include a conditional that checks the level before adding the "home" node:
Problem with multilevel navigation (newbie Razor)
I have created a multilevel navigation with the following wiki: http://our.umbraco.org/wiki/reference/code-snippets/razor-snippets/nested-navigation-with-start-and-finish-levels
But I want to use a home button, so I used the following code:
But when I look at the navigation, the home button appears in all subnavs like this:
Home
Photos
|_Home
|_2010
|_2012
News
|_Home
|_New website
|_etc
I want to have 1 home button only, somebody have a clue about this one?
This is a recursive method and therefore the "Home" link will be added in each time the method is called, which is once for every set of child nodes. Probably the easiest way to not include it here, making minimal changes to your code, would be to include a conditional that checks the level before adding the "home" node:
is working on a reply...