Hi
I'm having problems with the following code. What I want to do is output a menu depending on what language/website you are on.
But nothing gets outputted even though the LongLang is ex. da-DK.
If I output all three menus without the if-statements all three menues gets outputted.
What is wrong?
!--@If(Global:Area.LongLang = 'da-DK')--
<div id="PortalNavigationContainer">
<ul class="dwnavigation" id="PortalNavigationDK" settings="areaid:1;startlevel:1;endlevel:2;expandmode:All;template:PortalNav.xslt"></ul>
</div>
<!--EndIf-->
!--@If(Global:Area.LongLang = 'de-DE')-->
<div id="PortalNavigationContainer" style="display: none">
<ul class="dwnavigation" id="PortalNavigationDE" settings="areaid:121;startlevel:1;endlevel:2;expandmode:All;template:PortalNav.xslt"></ul>
</div>
<!--@EndIf-->
!--@If(Global:Area.LongLang = 'en-GB')-->
<div id="PortalNavigationContainer" style="display: none">
<ul class="dwnavigation" id="PortalNavigationUK" settings="areaid:120;startlevel:1;endlevel:2;expandmode:All;template:PortalNav.xslt"></ul>
</div>
<!--@EndIf-->
Developer forum
E-mail notifications
Menu depending on language
Jesper Sørensen
Posted on 28/06/2011 10:32:45
Replies
Jesper Sørensen
Posted on 28/06/2011 10:38:52
The forum has some problems with the tags, so some of the < and > gets cut off.
I. Sergey
Posted on 29/06/2011 12:29:53
Hi Jesper,
First don't use the apostrophes here
@If(Global:Area.LongLang = 'en-GB')
It's better to write it like the following:
@If(Global:Area.LongLang==en-GB)
And second I think such type of the conditions don't work correctly. It might be a bug.
First don't use the apostrophes here
@If(Global:Area.LongLang = 'en-GB')
It's better to write it like the following:
@If(Global:Area.LongLang==en-GB)
And second I think such type of the conditions don't work correctly. It might be a bug.
Nicolai Høeg Pedersen
Posted on 29/06/2011 14:39:21
Hi Jesper
What version of DW are you running on? First versions with if did not support the global tags.
What version of DW are you running on? First versions with if did not support the global tags.
David Matheson
Posted on 04/07/2011 15:15:54
Hi Jesper,
I'm using the alternate tag @If(Global:Area.Culture.CountryCode=DK) and this works fine (customer is currently on 19.2.1.3)
You must be logged in to post in the forum