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
Hello Umbraco Colleagues,
Can't figure out this simple thing in the new schema: I need pass the property alias as a parameter and get its value.
This returns the property alias name, not its value (property is the parameter that represents the property alias)
<ul> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <xsl:value-of select="$property" /> </li> </xsl:for-each></ul>
Thanks for the help.
David
Hi David,
You use the local-name() or name() functions for this:
<xsl:value-of select="*[name() = $property]" />
(name() is shorter and safe to use in Umbraco, so go with that - local-name() is used when using namespaces and gives the name without the prefix)
/Chriztian
Hi David.
Try this one:
<xsl:value-of select="*[name()=$property]" />
UPDATE after posting my answer: Damn you're fast Chriztian. Or maybe I'm just too slow :)
/Kim A
Hi Chriztian, Hi Kim,
Thanks to you both - works as advertised.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Property alias as parameter (4.5.2, new schema)
Hello Umbraco Colleagues,
Can't figure out this simple thing in the new schema: I need pass the property alias as a parameter and get its value.
This returns the property alias name, not its value (property is the parameter that represents the property alias)
Thanks for the help.
David
Hi David,
You use the local-name() or name() functions for this:
(name() is shorter and safe to use in Umbraco, so go with that - local-name() is used when using namespaces and gives the name without the prefix)
/Chriztian
Hi David.
Try this one:
<xsl:value-of select="*[name()=$property]" />
UPDATE after posting my answer: Damn you're fast Chriztian. Or maybe I'm just too slow :)
/Kim A
Hi Chriztian, Hi Kim,
Thanks to you both - works as advertised.
David
is working on a reply...