Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Feb 11, 2010 @ 21:34
    Garrett Fisher
    0

    how to get current url

    It's the funniest thing, but I can't figure out how to write the URL of the current page to the page?!  I know how to do it in the XSLT file, but how about the template??  I tried "insert page field" tool, but don't know what property it is, and {umbraco.library:NiceUrl(@id)} doesn't work in a template.

    Anyone?

    Thanks,

    Garrett

  • Garrett Fisher 341 posts 496 karma points
    Feb 11, 2010 @ 21:55
    Garrett Fisher
    0

    I mean the FULL URL, please.  That's what I need.

    //Garrett

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 11, 2010 @ 22:05
    Kim Andersen
    103

    Hmm...

    Then you could get it like this:

    http://<umbraco:Item field="pageID" xslt="umbraco.library:RequestServerVariables('SERVER_NAME')" runat="server"></umbraco:Item><umbraco:Item field="pageID" xslt="umbraco.library:NiceUrl({0})" runat="server"></umbraco:Item>

    I don't know if this i the perfect way to do it, but you'll get the whole URL including http:// and the domainname.

    /Kim A

  • Garrett Fisher 341 posts 496 karma points
    Feb 12, 2010 @ 14:07
    Garrett Fisher
    0

    That'll do 'er!  Thanks very much!

    //Garrett

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 12, 2010 @ 14:08
    Kim Andersen
    0

    You are welcome Garrett :)

    Remember to mark this post as answered.

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft