3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 474 Views |
-
<if children> Menu(1) must look different

2 June 2012 at 4:24am
Hi there
I'm struggeling with the following problem.
Everytime Menu(1) has got children, Menu(1) has to to look different than the other main menu links.
For now my structure looks something like this:
<ul id="Navigation">
<% control Menu(1) %>
<li><a href="$Link" title="Go to the $Title.XML page" <% if LinkingMode %>class="$LinkingMode"<% end_if %>>$MenuTitle</a>
<% if LinkOrSection = section %>
<% if Children %>
<ul id="Sub-Menu">
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page" <% if LinkingMode %>class="$LinkingMode"<% end_if %>>$MenuTitle</a>
<% if LinkOrSection = section %>
<% if Children %>
<ul id="Subsub-Menu">
<% control Children %>
<li><a href="$Link" title="Go to the $Title.XML page" <% if LinkingMode %>class="$LinkingMode"<% end_if %>>$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>Would anyone know how to do it? I hope you understand what I mean. It's hard to explain.
Thanks
Jessi
-
Re: <if children> Menu(1) must look different

2 June 2012 at 12:20pm
I'm not sure I follow by has to 'look' different. You can use something like <% if Children %>class="has-children"<% end_if %> to add a class to something if it has children. Read up on the template controls documentation page for all the template controls you can use.
-
Re: <if children> Menu(1) must look different

3 June 2012 at 1:12am
I'm still struggling with this problem. I have tried lot's of stuff, but sometimes the menu disappears and then it appears twice etc. I've also read controls documentation, but still no clue.
Could you please have a look at the attached pic and tell me if this is possible to do. Maybe I can stop trying.
| 474 Views | ||
|
Page:
1
|
Go to Top |


