1

I'm trying to change the URL to lower in my href tag, here is my code:

<a href="{$url}{umbraco.library:NiceUrl(@id)}/{$AppendedID}/">

I've tried using Exslt.ExsltStrings:lowercase(node-set) with no joy as this throws an error. Does anyone have any suggestions?

Funky
  • 12,890
  • 35
  • 106
  • 161
  • [This post][1] might help, as it deals with changing case in XSLT [1]: http://stackoverflow.com/questions/586231/how-can-i-convert-a-string-to-upper-or-lower-case-with-xslt – Steve Temple Mar 14 '13 at 10:44

2 Answers2

2

The following expression should work:

Exslt.ExsltStrings:lowercase(concat($url, umbraco.library:NiceUrl(@id), '/', $AppendedID, '/'))

Testing with the following piece of code ....

<xsl:for-each select="$currentPage">
    <xsl:variable name="url" select="'http://www.EXAMPLE.com'" />
    <xsl:variable name="AppendedID" select="123" />
    <a href="{Exslt.ExsltStrings:lowercase(concat($url, umbraco.library:NiceUrl(@id), '/', $AppendedID, '/'))}">
        <xsl:value-of select="@nodeName" />
    </a>
</xsl:for-each>

.... the rendered HTML should be along the lines of ....

<a href="http://www.example.com/some-page.aspx/123/">Some Page</a>
Goran Mottram
  • 6,244
  • 26
  • 41
0

I don't know direct way to solve this except using Exslt.ExsltStrings:lowercase(node-set)

but is this throw error when you use it with umbraco.library:NiceUrl then you may try to make the string lower and store it in temp variable then use this temp variable directly.

ebram khalil
  • 8,252
  • 7
  • 42
  • 60