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
I have the following code to get children of a parent, where the parent is selected by id.
How could I make it so that I can also get some text from one of the parent's tabs and put it in the <li></li> also?
<xsl:variable name="source" select="1155"/>
<xsl:template match="/"><ul><xsl:for-each select="umbraco.library:GetXmlNodeById($source)/node [string(data [@alias='umbracoNaviHide']) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li></xsl:for-each></ul></xsl:template>
Got it!
<xsl:value-of select="data[@alias= 'FIELDNAMEHERE']" />
Hi Amir,
You can use <xsl:value-of select="../@nodeName"/> to get something of the parent but you need to be more specific of what you would like to select.
Ron
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Getting text from field into xslt
I have the following code to get children of a parent, where the parent is selected by id.
How could I make it so that I can also get some text from one of the parent's tabs and put it in the <li></li> also?
<xsl:variable name="source" select="1155"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/node [string(data [@alias='umbracoNaviHide']) != '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
Got it!
<xsl:value-of select="data[@alias= 'FIELDNAMEHERE']" />
Hi Amir,
You can use <xsl:value-of select="../@nodeName"/> to get something of the parent but you need to be more specific of what you would like to select.
Ron
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.