Copied to clipboard

Flag this post as spam?

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


  • Franclim 8 posts 27 karma points
    Nov 25, 2009 @ 14:39
    Franclim
    0

    guess url in codebehind

    Hy everyone:

    I'm developing some behind code to replace the xslt needs. Don't like the idea of spliting design between the template and the xlst.

    How can i know the url to a document?

    I have the class Document, but it don't give me the url to it.

    Is there another class or method like the NiceUrl from xslt?

     

    Thanks,

    FS

     

     

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Nov 25, 2009 @ 14:49
    Dirk De Grave
    1

    Can use the same method, it's a static method from the library class, so:

    using umbraco;
    var url = library.NiceUrl(documentId);

    Don't forget to add the necessary assembly references!

    Hope this helps.

    Regards,

    /Dirk

     

     

  • 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