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 MultiNodeTreePicker for picking related content.
When a node is deleted with is in use by te MultiNodeTreePicker my razor code gets an error.
Is is possible to check if a node exists?
@if(@CurrentPage.HasValue("related")) { <ul> @foreach (var item in @CurrentPage.related.ToString().Split(',')) { var page = Umbraco.TypedContent(item); <li> <a href="@page.Url"> @page.Name </a> </li> } </ul> }
Hello Bas
this should work :)
@if(@CurrentPage.HasValue("related")) { <ul> @foreach (var item in @CurrentPage.related.ToString().Split(',')) { var page = Umbraco.TypedContent(item); if(page != null){ <li> <a href="@page.Url"> @page.Name </a> </li> } } </ul>
}
Thanks Kasper! This works!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
MultiNodeTreePicker check deleted nodes
I use the MultiNodeTreePicker for picking related content.
When a node is deleted with is in use by te MultiNodeTreePicker my razor code gets an error.
Is is possible to check if a node exists?
Hello Bas
this should work :)
}
Thanks Kasper! This works!
is working on a reply...