Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • praveity 100 posts 125 karma points
    Jun 08, 2011 @ 14:06
    praveity
    0

    NiceUrl Issue

    Can we do this?

    <xsl:value-of select="number($currServicePageID)"/>
    <a href="{umbraco.library:NiceUrl($currServicePageID)}"></a>

    I have a value on $currentServicePageID which could be possibly string so i converted it to number as NiceUrl takes so but this is not working at all.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 08, 2011 @ 14:23
    Tom Fulton
    1

    Hi,

    That should work - what exactly is the problem?  Are you getting an error when you try to save?

    You might want to add a check to make sure the variable has something in it, ie

    <xsl:if test="$currServicePageID &gt; 0">
    <a href="{umbraco.library:NiceUrl($currServicePageID)}"></a>
    </xsl:if>

    Otherwise you can get an error if it's empty or sometimes while saving.

    -Tom

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Jun 08, 2011 @ 14:30
    Thor Madsen-Holm
    1

    Do you receive the error when saving inside Umbraco ?

    /Thor

Please Sign in or register to post replies

Write your reply to:

Draft