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 have the following content tree
- products -> MNTP -> xpath select contactpersons where show=1
- ContactPerson1 -> show= 1
- ContactPerson2 > show= 2
So I have three root nodes (Home1, Home2 and ContactPersons). In Home2 I have a document type Products which has a MultiNode Tree Picker for ContactPersons. The Contact person doc type has a property named 'show'. In the MNTP of Products I only want to choose contact persons where show has the value of 2.
The 'show' property is a Checkbox list with predefined values 1 and 2.
What XPath expression do I need to use so that I can filter the contact persons?
I now use //ContactPersons and this give me a list of all the contact persons, but I can't get the filter to work.
//ContactPersons[ContactPerson] same result as //ContactPersons
//ContactPersons[ContactPerson[@show=2]] shows me the complete tree node
I hope you can help me :)
+1 to this, it has been 3+ years and xpath is still flakey (operating differently to the standard) and largely undocumented.
Something you could try is using the $currentPage variable as the starting point for your XPath expression. Something like the following example which is off the top my head and untested but worth a try Upsers
If you post up your current XPath expression it may also help others to understand where you are at already and provide more specific help.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted