I’m trying to check if a certain node has a property “footerTextTitle” by:
@foreach (var nodeLink in footerTop.ChildrenAsList.Where(n => n.GetProperty("footerTextTitle").IsNull() == true))
{
<li><a href='@nodeLink.GetProperty("footerLinkUrl").Value.ToString()'>@nodeLink.GetProperty("footerLinkTitle").Value.ToString()</a></li>
}
and getting a “Object reference not set to an instance of an object.” error.
How can I do this ?
Thanks.
To check if a property exists simply check if the property is null like below
P.S. To debug, append this to the url
http://www.example.com/page.aspx
?umbDebugShowTrace=true