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

  • Kim Andersen 1447 posts 2197 karma points MVP
    Feb 11, 2010 @ 21:53
    Kim Andersen
    1

    Hi Garrett

    You can use some inline xslt to find the URL to the current page in your template like this:

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

    This should write out the url to the page that you are currently standing on.

    Hope this helps.

    /Kim A

  • 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