I tried ancestor::SiteSettings/PublicationFolderYear
But this isn't exactly what I'm looking for, as it is just selecting the first year folder under Publication Area
But I understand why, as the MNTP-datatype under the Developer-section clearly states that:
"This XPath expression should be written to match ONE node, if the expression matches more than one node, then the first node matched will be used as the start node."
So I reverted back to just choosing a Start Node using the Node Picker, and everything works fine
Maybe the reason why the Node Picker didn't work the first time was because my Start Node Id got corrupted.
Thanks for your help anyway, and maybe I can help someone else struggling with XPath :)
XPath for selecting nodes in subfolders
Hi,
I'm using the MNTP component for selecting publication items on a member node:
I'm trying to read out the publication items using the folling XPath statement:
descendant::PublicationItem[@isDoc]
But this doesn't result in a list of publication items on the publication tab in the member node.
Anyone any suggestions for an XPath query that will enable the selection of publication items from the Member item node?
Thanks for your help,
Anthony
Hi Anthony,
You need to go up to a common ancestor and then down Publications branch - so:
(Assuming the Publications node's alias is also Publications)
Alternatively, MNTP usually has a $parentPage variable you can use:
/Chriztian
Hi Chriztian,
Thanks for your help,
I tried ancestor::SiteSettings/PublicationFolderYear
But this isn't exactly what I'm looking for, as it is just selecting the first year folder under Publication Area
But I understand why, as the MNTP-datatype under the Developer-section clearly states that:
"This XPath expression should be written to match ONE node, if the expression matches more than one node, then the first node matched will be used as the start node."
So I reverted back to just choosing a Start Node using the Node Picker, and everything works fine
Maybe the reason why the Node Picker didn't work the first time was because my Start Node Id got corrupted.
Thanks for your help anyway, and maybe I can help someone else struggling with XPath :)
greetings,
Anthony
Ah OK,
Didn't catch that you we're asking about the start node XPath - I thought this was for the filtering (to include or exclude items).
/Chriztian
is working on a reply...