How do I pass a language specific parameter to an Umbraco macro?
The code in my template looks like this:
Code:<?UMBRACO_MACRO macroAlias="FlashImageRotator" objectID="i_fokus" width="229" height="100" transition="fade" showNavigation="0" overStretch="0" mediaFile="" flashVars="rotatetime=5;file=/sv/banners.aspx"></?UMBRACO_MACRO>
The part I want to make language dependant is
file=/sv/banners.aspx. This is the relative URL to the page that generates the Swedish banner playlist (XML). (The page "banners.aspx" uses another XSLT/macro to generate an XML playlist for the Flash Image Rotator. This playlist is different depending on the language version of the site.)
So, when the English version of the site is used, the macro code in the page template should look like this:
Code:<?UMBRACO_MACRO macroAlias="FlashImageRotator" objectID="i_fokus" width="229" height="100" transition="fade" showNavigation="0" overStretch="0" mediaFile="" flashVars="rotatetime=5;file=/en/banners.aspx"></?UMBRACO_MACRO>
...the only difference being the URL to the page that generates the playlist;
file=/en/banners.aspx. This means that the page template should get the English banner playlist.
Sounds complicated, but it really isn't.
Since the parameter "file" is encapsulated in a call to an Umbraco macro, I can't use a dictionary item to add "/sv" or "/en" to the macro call. Is there another way? Remember that the English and Swedish site uses the same page template.
Web Developer at Kärnhuset -
http://www.karnhuset.net - Stockholm, Sweden