Copied to clipboard

Flag this post as spam?

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


  • Blake Watt (Clerke) 106 posts 351 karma points MVP 2x
    Apr 20, 2012 @ 21:33
    Blake Watt (Clerke)
    0

    Link to umbraco ID

    This has got to be really easy for everyone but me. I just want to link to a specific page within umbraco with the ID of 1106. I have the below code, obviously it doesn't link to the actual ID that I need it too. Help is much appreciated. Thank you :)

    <href="{@id}">sitemap</a>
  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Apr 20, 2012 @ 23:37
    Rasmus Fjord
    0

    Ey Blake :) 

    Im gussin' you took up the razor I told ya to hehe :) 

     

    If you want the url for a specific ID you do like this 

    @{
    var myNode = @Model.NodeById(1106);
    }
    @myNode.NiceUrl and @myNode.Name
  • Pasang Tamang 258 posts 458 karma points
    Apr 21, 2012 @ 03:27
    Pasang Tamang
    0

    Hi blake,

    You can grab the solution by <a href="{umbraco.library:NiceUrl(@id)}">sitemap</a

    Thanks

    PTamang

Please Sign in or register to post replies

Write your reply to:

Draft