Copied to clipboard

Flag this post as spam?

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


  • Jonas Høiby 62 posts 53 karma points
    Oct 22, 2009 @ 09:13
    Jonas Høiby
    0

    sending NiceUrl to macro .. howto?

    i need to send my NiceUrl  -  based on either my currentPage or an ID that i set  -  to my maco wich contains a userControl (which has some properties) ..

     

    how does one go about doing this? :-)

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 22, 2009 @ 09:26
    Dirk De Grave
    0

    Jonas,

    you don't need to do that, you can use the umbraco.library.NiceUrl(id) from within your user control. All you need is pass the id of the node through the macro to your user control using a parameter with value [#pageID] (for current page) or your own id (Make sure the alias of the parameter equals the name of the property on the user control). Actually, you don't have to pass in the id of the current node as this can also be retrieved through

    umbraco.presentation.NodeFactory.Node.GetCurrent().Id

    in your user control.

    Hope this helps.

    Regards,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft