Copied to clipboard

Flag this post as spam?

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


  • andrew shearer 409 posts 517 karma points
    Aug 22, 2012 @ 05:38
    andrew shearer
    0

    Node.Url vs Node.NiceUrl

    which one do you use and why? why are there 2?

    thanks

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 22, 2012 @ 07:29
    Fuji Kusaka
    0

    Hi Andrew,

    If you are using Razor this is the way to go for

    foreach(dynamic Node in page.Children){
    <a href="@Node.Url ">@Node.Name</a>
    }

    and in XSLT 

    <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>

     

    Hope this is what  you were looking for

    //fuji

  • andrew shearer 409 posts 517 karma points
    Sep 02, 2012 @ 02:48
    andrew shearer
    0

    hi Fuji

    i don't really use dynamic in razor anymore, i use the node factory directly (ie. INode).

    but this has NiceUrl and Url. Has NiceUrl been deprecated in favour of Url? 

    thanks

    andrew

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies