I'm using the embedded content data type for a list of links on my pages. Even when no items have been added for the property the data type still sets the value to <data /> which means I can't use the built in recursion doesn't work properly.
So I'm trying to do something like this but it's returning 0 where it should be returning the home node.
var quickLinkPage = Model.Content.AncestorsOrSelf().Where("quickLinks != \"<data />\"");
I've also tried this, which I'm not entirely sure is valid but I don't get any error.
var quickLinkPage = Model.Content.AncestorOrSelf().Where("quickLinks != \"<data />\"");
No doubt I'm missing something simple but I can't think what.
Getting first node with empty xml property
I'm using the embedded content data type for a list of links on my pages. Even when no items have been added for the property the data type still sets the value to <data /> which means I can't use the built in recursion doesn't work properly.
So I'm trying to do something like this but it's returning 0 where it should be returning the home node.
I've also tried this, which I'm not entirely sure is valid but I don't get any error.
No doubt I'm missing something simple but I can't think what.
Worked out how to do it.
is working on a reply...