Copied to clipboard

Flag this post as spam?

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


  • Mike Delamater 3 posts 23 karma points
    Oct 27, 2010 @ 15:34
    Mike Delamater
    0

    How to get Request.UrlReferrer passed into xslt macro?

    I need to know which page was previous to the current in a macro I'm writing. Would like to get the urlreferrer value via c# script in template and pass it as a parameter to the macro, but can't see how to do it. <%= getUrl() %> is not interpreted by the macro. Anyone with good ideas out there?

  • Mike Delamater 3 posts 23 karma points
    Oct 27, 2010 @ 15:35
    Mike Delamater
    0

    And by the way, I'm NOT Mike Delamater, I'm Siw Ørnhaug. This profile mixup has caused me a lot of trouble just getting logged in!

  • Kim Andersen 1447 posts 2196 karma points MVP
    Oct 27, 2010 @ 18:00
    Kim Andersen
    2

    Hi Siw

    In your XSLT-file you can grab the referring page like this:

    <xsl:value-of select="umbraco.library:RequestServerVariables('http_referer')"/>

    This means that you don't have to get the value through C# and then pass it as a parameter.

    /Kim A

  • Mike Delamater 3 posts 23 karma points
    Oct 28, 2010 @ 10:45
    Mike Delamater
    0

    Thanks a lot Kim!

    I knew it had to be fairly straight foreward :-)

     

  • 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