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

    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 4996 karma points c-trib
    Jun 08, 2011 @ 14:23
    Tom Fulton


    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>

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


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

    Do you receive the error when saving inside Umbraco ?


Please Sign in or register to post replies

Write your reply to: