I am new to Umbraco and find refrencing content nodes difficult in Umbraco as it seams you have to go back to the doctype of the node to select it in xpath. Is this correct or can you just follow the tree using the name of the node itself?
With XPath it's easy to select nodes by their element name (i.e. what Umbraco calls the "doctype alias") or by the value of an attribute, but XML doesn't have any way to distinguish between what Umbraco calls a "Document" and its properties, so Umbraco adds a special "isDoc" attribute to do that (it's always empty, but it's easy to test for, if you need to select multiple doctypes in a single selection).
Let's say $currentPage is "Home", then you can try all of these to get what you need:
I made a package called XML Dump that gives you easy access to the XML for any page you're on - you can even try some XPath on the document, directly from the URL...
Selecting nodes by node name
I am new to Umbraco and find refrencing content nodes difficult in Umbraco as it seams you have to go back to the doctype of the node to select it in xpath. Is this correct or can you just follow the tree using the name of the node itself?
Hi Steve,
It's easiest to understand if you know how the XML looks - very condensed, a site looks like this:
With XPath it's easy to select nodes by their element name (i.e. what Umbraco calls the "doctype alias") or by the value of an attribute, but XML doesn't have any way to distinguish between what Umbraco calls a "Document" and its properties, so Umbraco adds a special "isDoc" attribute to do that (it's always empty, but it's easy to test for, if you need to select multiple doctypes in a single selection).
Let's say $currentPage is "Home", then you can try all of these to get what you need:
/Chriztian
is working on a reply...