Funky
Funky

Reputation: 13608

Umbraco NiceUrl ToLower

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?

Upvotes: 1

Views: 350

Answers (2)

Goran Mottram
Goran Mottram

Reputation: 6304

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>

Upvotes: 2

ebram khalil
ebram khalil

Reputation: 8331

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.

Upvotes: 0

Related Questions