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 folks,
I have a content picker alias in "discoverUrl" and seems like my xslt wont save and returning me errors whenever i dont choose any content.
Here is my xslt, not sure what am doing wrong here
<ul> <xsl:for-each select="$currentPage"> <xsl:variable name="discover" select="discoverURL" /> <xsl:if test="string($discover) != ' '"> <xsl:variable name="sUrl" select="umbraco.library:NiceUrl(discoverURL)"/> <xsl:value-of select="$sUrl"/> </xsl:if> </xsl:for-each> </ul>
Any idea ?
Hi Fuji,
Problem is if it's empty, it will be different from ' ' so the NiceUrl() is called.
Use normalize-space() instead:
<xsl:if test="normalize-space($discover)"> ... </xsl:if>
/Chriztian
Thanks Chriztian!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Content Picker
Hi folks,
I have a content picker alias in "discoverUrl" and seems like my xslt wont save and returning me errors whenever i dont choose any content.
Here is my xslt, not sure what am doing wrong here
Any idea ?
Hi Fuji,
Problem is if it's empty, it will be different from ' ' so the NiceUrl() is called.
Use normalize-space() instead:
/Chriztian
Thanks Chriztian!
is working on a reply...