Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Anyone can help me on this?...... i have my site map and would like to display Home instead of the "En".
if (items.Count() > 0) { <ul> @foreach (var item in items) { if(@Model.NodeTypeAlias =="Home") { <li> <a href="/">Home</a></li> } else{ <li> <a href="@item.Url">@item.Name</a> @traverse(item) </li> } } </ul> }}
at this point my if statement isnt doing anything.
//fuji
You're using "Model" instead of "item" inside your loop. This should work:
if(item.NodeTypeAlias =="Home")
Jeroen
Yes it works.
@foreach (var item in items) { if(item.NodeTypeAlias =="Home") { <li> <a href="/">Home</a></li> @traverse(item) } else{ <li> <a href="@item.Url">@item.Name</a> @traverse(item) </li> } }
thanks Jeroen
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Site map
Hi,
Anyone can help me on this?...... i have my site map and would like to display Home instead of the "En".
at this point my if statement isnt doing anything.
//fuji
You're using "Model" instead of "item" inside your loop. This should work:
Jeroen
Yes it works.
thanks Jeroen
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.