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
We are trying to use Xpath to select the folder a user will start at when using a multi-node tree picker in umbraco 7.1.9
-----> Your Product
----------> Child 1
----------> Child 2
-----> Other Top Level Node
If the node doctype is ProductPage and the name of it is Your Product:
/root/Home/ProductPage allows us to select the specific doctype.
However as this doctype will be changing in future, but keeping the same name we need to be able to select on the string 'Your Product'.
None of the options we have tried seem to work, even those based off other projects that are in different versions of umbraco, e.g. $site//descendant::*[@isDoc][name = 'Your Product'] which is based off a query that works in umbraco 7.5.3.
$site//descendant::*[@isDoc][name = 'Your Product']
Does anyone know how to solve this?
You say the node type is changing in the future. The best option is to change your xpath when this happens.
Because doing this on name is even less save. The name of item can be changed by editors and that will break your xpath query as well.
You can instruct your editors not to change the name, but at some point they will..Trust me
To pick up an old thread - but because I needed similar and probably will need my own answer in the future... you need @nodeName
$root/configuration/configuration[@nodeName ="Blog Filter 1"]
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted