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
I use the following code to rend a list:
foreach(var item in this.Model.ChildrenAsList){ <a href="@item.NiceUrl">@item.Name</a>}
And the result of NiceUrl always is "#".
If i call "umbraco.library.NiceUrl(item.Id)" before it,it will return a correct url, such as(/project/2010/hello.aspx).
Is this a bug for NiceUrl? or i did something wrong?
Thanks!
Try using @item.Url instead of NiceUrl?
Also, just use Model.Children instead of this.Model.ChildrenAsList.
Sebastiaan, thanks.
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
NiceUrl property doesn't work well?
I use the following code to rend a list:
And the result of NiceUrl always is "#".
If i call "umbraco.library.NiceUrl(item.Id)" before it,it will return a correct url, such as(/project/2010/hello.aspx).
Is this a bug for NiceUrl? or i did something wrong?
Thanks!
Try using @item.Url instead of NiceUrl?
Also, just use Model.Children instead of this.Model.ChildrenAsList.
Sebastiaan, thanks.
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.