21294 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 492 Views |
-
Show only on first level pages not in sub pages?!

17 June 2010 at 10:05pm
My website has a sidebar with the 2nd level menu items related to that category.
But if the user is on a 1st level page (example.com/page-name/) where are no sub pages there is nothing and it looks a bit ugly
I want to show all first level menu items. But how can I detect if it's a first level with no sub pages?i think it is really simple, but can't get my head around it
-
Re: Show only on first level pages not in sub pages?!

18 June 2010 at 1:25pm
Howdi,
Where you have your sub menu you have something like this:
<% control Menu(2) %>
......
<% end_control %>What you can do is have an if statement around it, with an else afterwards:
<% if Menu(2) %>
<% control Menu(2) %>
......
<% end_control %><% else %>
<% control Menu(1) %>
......
<% end_control %><% end_if %>
Hope that helps.
| 492 Views | ||
|
Page:
1
|
Go to Top |


