Copied to clipboard

Flag this post as spam?

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


  • Frederik T 237 posts 358 karma points
    Jul 06, 2012 @ 13:19
    Frederik T
    0

    Passing current page URL through macro parameter

    A quick question i hope:

    Is it possible, in a template, to pass the current page's url to a macro parameter?

    I have a macro which is a ascx user control which takes a redirect url as a parameter, which is using actual urls, and that isnt very pretty. It would be great if its possible to somehow write something like {locallink:1661} (which doesnt work btw) and that would be sent as a url to the user control.

    Is it completetly hopeless or?

  • Mike Chambers 636 posts 1253 karma points c-trib
    Jul 06, 2012 @ 19:57
    Mike Chambers
    0

    Why do you need the url to be passed as a parameter? the usercontrol has direct access to interogate it?

    System.Web.HttpContext.Current.Request.Url and methods of this...

  • Nigel Wilson 945 posts 2077 karma points
    Jul 07, 2012 @ 21:00
    Nigel Wilson
    0

    Hi Frederik

    If you need a redirection URL you could pass in the ID of the redirect node (assuming your redirects are within the site) and then in code behind use the URL to retrieve the respective URL.

    Cheers, Nigel

Please Sign in or register to post replies

Write your reply to:

Draft