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
hi guys,
a problem i have surely has a quick fix, but i cannot seem to get the right syntax, i have:
<xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($currentId)" /><xsl:variable name="currentLink" select="$currentNode/sliderPageLink" />
<xsl:value-of select="$currentLink" disable-output-escaping="yes" />
so far so good and the ID is displayed of the node selected by the content picker
Then trying to get the nice url of the id is where the problem is, i have tried
<xsl:variable name="linkData" select="umbraco.library:NiceUrl($currentLink)/data" />
and various others but always get a parsing error on the xslt file
any advice would be appreciated
thanks.
Hey Warren,
If $currentLink gives you the right ID then you just need to put that into NiceUrl():
<a href="{umbraco.library:NiceUrl($currentLink)}">Click Me!</a>
/Chriztian
hi chriztian,
yes i tried that also and get the parse error from the below:
<xsl:element name="div"> <xsl:attribute name="class">carousel-caption</xsl:attribute> <a href="{umbraco.library:NiceUrl($currentLink)}"> <p><xsl:value-of select="$currentText" disable-output-escaping="yes" /></p></a> </xsl:element>
any ideas ?
Hi Warren,
There could be several reasons for that - most likely you're doing this inside a loop, and one of the nodes processed hasn't got a valid $sliderPageLink.
Try making it conditional:
<xsl:if test="normalize-space($currentLink)"> <div class="carousel-caption"> <a href="{umbraco.library:NiceUrl($currentLink)}"> <p>...</p> </a> </div> </xsl:if>
thanks chriztian, it was indeed that
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
NiceUrl problem from Content Picker ID
hi guys,
a problem i have surely has a quick fix, but i cannot seem to get the right syntax, i have:
<xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($currentId)" />
<xsl:variable name="currentLink" select="$currentNode/sliderPageLink" />
<xsl:value-of select="$currentLink" disable-output-escaping="yes" />
so far so good and the ID is displayed of the node selected by the content picker
Then trying to get the nice url of the id is where the problem is, i have tried
<xsl:variable name="linkData" select="umbraco.library:NiceUrl($currentLink)/data" />
and various others but always get a parsing error on the xslt file
any advice would be appreciated
thanks.
Hey Warren,
If $currentLink gives you the right ID then you just need to put that into NiceUrl():
/Chriztian
hi chriztian,
yes i tried that also and get the parse error from the below:
<xsl:element name="div">
<xsl:attribute name="class">carousel-caption</xsl:attribute>
<a href="{umbraco.library:NiceUrl($currentLink)}">
<p><xsl:value-of select="$currentText" disable-output-escaping="yes" /></p></a>
</xsl:element>
any ideas ?
Hi Warren,
There could be several reasons for that - most likely you're doing this inside a loop, and one of the nodes processed hasn't got a valid $sliderPageLink.
Try making it conditional:
/Chriztian
thanks chriztian, it was indeed that
is working on a reply...