21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 198 Views |
-
If statement help

15 September 2012 at 2:54am
Guys
this is probably stupidly simple, but how do I do something different based on what menu item I am in, within the loop.
Basically the recipes drop down is going to be a "mega menu" where as the rest are just normal drop downs.
I cant think how to get around this with built in template controls! Help!
<% control Menu(1) %>
<% if Children %>
<% if $MenuTitle="Recipes" %><% else %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle.XML</a>
<ul class="dropdown1">
<% control Children %>
<li><a href="$Link">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
<% else %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle.XML</a>
<% end_if %>
</li>
<% end_control %> -
Re: If statement help

18 September 2012 at 3:31am Last edited: 18 September 2012 3:31am
Basically <% if $MenuTitle="Recipes" %>, like in your example, should work - if you're at version 3.0.x that is. In 2.4 it should be <% if MenuTitle = Recipes %>...
But maybe I didn't understand you correctly, and you want to know howto create that megadropdown?
| 198 Views | ||
|
Page:
1
|
Go to Top |

