use a variable to grab the node, then pick whichever value you want to display:
<xsl:variable name="node" select="umbraco.library:GetXmlNodeById(XXXX)" />
<!-- Output name of node -->
<xsl:value-of select="$node/@nodeName" />
<!-- Output any property by name, e.g. 'shoeSize' -->
<xsl:value-of select="$node/shoeSize" />
Properties prefixed with an at-sign (@) are the built-in Umbraco properties (e.g., @nodeName, @createdDate esc.) whereas the ones you create yourself are created as children in the XML and thus don't use an at sign, so you should just write bodyText in your example above:
Generic porperties displays with node
hi, i'm building this website with umbraco and xslt.
when i use the GetXmlNodeById to display the node i want, it also displays values of properties within the node in the end of the node.
how can i prevent the value to be displayed.
br.
Gisli
Hi Gisli,
use a variable to grab the node, then pick whichever value you want to display:
/Chriztian
Thanks Chriztian,
i tried this:
where the content i want displayed is the value of the bodyText property, this however doesn't return anything.
with only the variable name it displays the content but also displays the extra content i don't want to be displayed.
do you guys see any reason why this shouldn't work?
Hi Gisli,
Properties prefixed with an at-sign (@) are the built-in Umbraco properties (e.g., @nodeName, @createdDate esc.) whereas the ones you create yourself are created as children in the XML and thus don't use an at sign, so you should just write bodyText in your example above:
/Chriztian
thanks a million Chriztian. works perfectly
is working on a reply...