Hi,
We are using ddrmenu and the SimpleTokens file.
I want to have spacers in my menu and think I have found a way.
If I call the title of the pages I want to identify as spacers 'Spacer' then just test if the title of the page is 'Spacer' and format that menu item accordingly.
So I know the token for the Title of a page is [TITLE] but how do some kind of conditional test to say 'if title is 'Spacer' ..... else .....'
Can it be done in SimpleTokens or do I need to use xslt ?
So far I have the below and it looks like it should work but something isn't right and it shows all the text between [?ENABLED] and [?ELSE] as well as the TEXT (Name) of the page.
As ever all help is appreciated.
Jacqui.
<ul id="dnn_pnav">
[*>NODE]
</ul>
[>NODE]
<li>
[?ENABLED]
[?TITLE] = SPACER
<span style="color:green">[=TEXT]</span>
[?ELSE]
<a href="[=URL]" target="[=TARGET]">[=TEXT]</a>
[/?]
[?ELSE]
<span style="color:green">[=TEXT]</span>
[/?]
[?NODE]
<ul>
[*>NODE]
</ul>
[/?]
</li>
[/>]
<script type="text/javascript">
(function($){
$().ready(function(){
$("#dnn_pnav > li > ul li").mouseover(function(e){
var subMenu = $(">ul", $(this));
if(subMenu.length > 0){
var offset = subMenu.offset();
var rightEage = offset.left + subMenu.outerWidth();
if(rightEage > $(window).width()){
subMenu.css("left", (parseInt(subMenu.css("left")) - (subMenu.outerWidth() + $(this).width())) + "px");
}
}
e.stopPropagation();
});
});
})(jQuery);
</script>