I have looked at using custom extension methods with an XPath expression, but the code involved was extremely overkill compared to what we would achieve.
Deep in the uQuery source-code, (in "uQuery-Nodes.cs"), I have this comment:
... forgot to say, $currentPage is already supported - we also have another param/variable called $ancestorOrSelf - which gets the first published ancestor node (or self - aka $currentPage)
Support for advanced XPath/XSLT extensions in MNTP
Hi guys,
It'd be great if I could specify an XPath to filter items based on an existing page field (such as an ID or something).
I have an example with a Media MNTP field, where I want to use the following XPath:
/*[myPrimaryID=$currentPage/myPrimaryID or Exslt.ExsltStrings:split(mySecondaryID,',')//token = $currentPage/myPrimaryID]
My "File" media type has two fields - one is a string, and one is a comma-separated list of strings.
This would be a really useful feature. Can submit a pull request via Codeplex too.
Cheers,
Benjamin
Hi Benjamin,
I agree, it would be a killer feature!
I have looked at using custom extension methods with an XPath expression, but the code involved was extremely overkill compared to what we would achieve.
Deep in the uQuery source-code, (in "uQuery-Nodes.cs"), I have this comment:
We're open to all suggestions! :-)
Cheers, Lee.
... forgot to say, $currentPage is already supported - we also have another param/variable called $ancestorOrSelf - which gets the first published ancestor node (or self - aka $currentPage)
is working on a reply...