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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...