I am passing an URL variable from one Umbraco page to another. I need to then pass that optional URL variable to an iframe in the target Umbraco page. The iframe is inside a macro that contains an XSLT snippet. How can I pass the URL variable to the macro?
But if you store the value in a macro parameter you should be able to fetch it by declaring a parameter like this
<xsl:param name="iframeParameter" select="/macro/YourParameterAlias" /> where "YourParameterAlias" is the alias you have speficied on the macro parameter.
Pass URL variable to iframe
I am passing an URL variable from one Umbraco page to another. I need to then pass that optional URL variable to an iframe in the target Umbraco page. The iframe is inside a macro that contains an XSLT snippet. How can I pass the URL variable to the macro?
Hi Connie
Would it be possible to add a macro parameter where the url could be stored and then fetched in the XSLT snippet?
/Jan
We're thinking the same, I'm just not sure how to fetch the variable in the XSLT. It would have to get the variable of the parent/container page.
Could this work?
Inside XSLT? No...then it would need to look like this...
<iframe src="displayframe.asp?parameter={umbraco.library:Request('querystring')}"></iframe>
But if you store the value in a macro parameter you should be able to fetch it by declaring a parameter like this
<xsl:param name="iframeParameter" select="/macro/YourParameterAlias" /> where "YourParameterAlias" is the alias you have speficied on the macro parameter.
/Jan
Oh, I'm thinking about this wrong. The macro and XSLT are actually running as part of the Umbraco page, so would have access to the querystring.
<iframe src="{$iframeSource}?{$qryString}" name="{$iframeName}_iframe"></iframe>
is working on a reply...