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.
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.
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?
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...
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
is working on a reply...