4.1 beta 2 - XPATH for parent node id does not work
Hi Ron,
I'm developing a multilingual site using Umbraco 4.1 beta 2. I'm using Ultimate pickers on the prototype site but I realise that this is going to cause me problems when I copy the site to create multiple languages. Obviously the Ultimate pickers will need to point to nodes in their own site, and not back to the prototype site! Anyway, that's why this package is perfect, I can use it to find my picker items using relative paths from the current node. Ideal.
However, when I install it on Umbraco v4.1 beta 2 no XPATH queries work for specifying the parent node id. If I enter the current node's ID, then it works as expected and I can choose from the child nodes of the current node. However, if I enter $currentPage, the picker simply displays nothing.
I'm not sure if this is to do with the new XML format in v4.1 but I would have thought that $currentPage would work anyway. Do you have any plans to test this package in v4.1?
Thanks Doug. I'm developing a site for 4.1 at the moment so I am creating my xslt macros to use the new schema (which is great, not sorry to see the back of data[@alias = 'bla'] everywhere that's for sure).
I'm hanging in for an upgrade to the project for 4.1 :) If required I'll see if I can have a look at it myself...
Any update on this working for the new xml schema? I too am doing a new scheme site (v4.5.1) and this is a perfect solution if we can just get it working for the new schema!
Is this the only code that needs to be modifed to get this working? In getParentNodeIdFromXPath? Ideally I guess an update would determine what version of umbraco is being used and adjust accordingly (like look at the useLegacyXml appsetting or whatever it is that is only present in 4.1 and higher).
Here's my latest attempt, but when I place a dropdownlist of this type in a doc type (right along with an Ultimate Picker to test both) and use an XPath in the Axendo, viewing the content (published) shows nothing, not even an empty dropdownlist:
4.1 beta 2 - XPATH for parent node id does not work
Hi Ron,
I'm developing a multilingual site using Umbraco 4.1 beta 2. I'm using Ultimate pickers on the prototype site but I realise that this is going to cause me problems when I copy the site to create multiple languages. Obviously the Ultimate pickers will need to point to nodes in their own site, and not back to the prototype site! Anyway, that's why this package is perfect, I can use it to find my picker items using relative paths from the current node. Ideal.
However, when I install it on Umbraco v4.1 beta 2 no XPATH queries work for specifying the parent node id. If I enter the current node's ID, then it works as expected and I can choose from the child nodes of the current node. However, if I enter $currentPage, the picker simply displays nothing.
I'm not sure if this is to do with the new XML format in v4.1 but I would have thought that $currentPage would work anyway. Do you have any plans to test this package in v4.1?
Thanks and keep up the good work.
David
For a quick work-around, you can use the old ('legacy') xml schema in 4.1 as well. Just change the setting in the umbracoSettings.config file.
cheers,
doug.
Thanks Doug. I'm developing a site for 4.1 at the moment so I am creating my xslt macros to use the new schema (which is great, not sorry to see the back of data[@alias = 'bla'] everywhere that's for sure).
I'm hanging in for an upgrade to the project for 4.1 :) If required I'll see if I can have a look at it myself...
Any update on this working for the new xml schema? I too am doing a new scheme site (v4.5.1) and this is a perfect solution if we can just get it working for the new schema!
Is this the only code that needs to be modifed to get this working? In getParentNodeIdFromXPath? Ideally I guess an update would determine what version of umbraco is being used and adjust accordingly (like look at the useLegacyXml appsetting or whatever it is that is only present in 4.1 and higher).
I wish my xslt was better!
XPathNavigator navigator = content.Instance.XmlContent.CreateNavigator();
string Expression =
xpath.Replace("$currentPage", "//node[@id='" + currentNodeId + "']").Replace("$currentParent",
currentNodeParent ==
null
? "/root"
: "//node[@id='" +
currentNodeParent
.Id + "']");
I tried this but doesn't seem to work :(
Here's my latest attempt, but when I place a dropdownlist of this type in a doc type (right along with an Ultimate Picker to test both) and use an XPath in the Axendo, viewing the content (published) shows nothing, not even an empty dropdownlist:
is working on a reply...