3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1250 Views |
-
menu tree trouble

10 November 2009 at 3:25pm
Hi all,
I'm trying to create a menu tree that displays the links to the children pages directly under the parent link. For example if I clicked on 'tractors/machinery':
Home.
Parts/Accessories.
Tractors/Machinery.
- New Machinery
- Used MachineryWorkshop.
Contact.
Here is the code in my .ss file I have at the moment:
<ul id="Menu1">
<% control Menu(1) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>Any help?! Cheers.
-
Re: menu tree trouble

10 November 2009 at 5:23pm
Try replacing the <% if Menu(2) %> with <% if LinkOrSection %>. The menu you are trying to achieve is similar to the default theme isn't it? You can use that as a good starting point.
-
Re: menu tree trouble

10 November 2009 at 5:24pm
Try replacing the <% if Menu(2) %> with <% if LinkOrSection %>. The menu you are trying to achieve is similar to the default theme isn't it? You can use that as a good starting point.
-
Re: menu tree trouble

11 November 2009 at 9:21am
Cheers Willr,
Yeah I've just been using the menu from the default theme and have edited the CSS so it's styled like a virticle tree style menu. I just tried chaning <% if Menu(2) %> with <% if LinkOrSection %>, still looks the same damnit. Any other advice?
-
Re: menu tree trouble

16 November 2009 at 10:33am
Hi again, I'm still having trouble with this. Any help please?
-
Re: menu tree trouble

17 November 2009 at 3:26pm
ahhh ha, I've figured out a bit of the problem. My code in my Page.ss is as follows:
<ul id="Menu1">
<% control Menu(1) %>
<li class="$LinkingMode">
<a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a>
</li>
<% if LinkOrSection = section %>
<ul id="Menu2">
<% control GroupsMenu %>
<% if Children %>
<li class="$LinkingMode">
<a href="$Link" title="<% sprintf(_t("GOTOPAGE","Go to the %s page"),$Title.XML) %>" class="$LinkingMode Nobottom">$MenuTitle</a>
<% else %>
<li><a href="$Link" title="<% sprintf(_t("GOTOPAGE"),$Title.XML) %>" class="$LinkingMode">$MenuTitle</a>
<% end_if %>
<% if LinkOrSection = section %>
<% if ChildGroups %>
<ul class="sub">
<li>
<ul>
<% control ChildGroups %>
<li class="$LinkingMode">
<a href="$Link" title="<% sprintf(_t("GOTOPAGE"),$Title.XML) %>" class="$LinkingMode">$MenuTitle.LimitCharacters(22)</a>
</li>
<% end_control %>
</ul>
</li>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
<% end_control %>
</ul>My only issue is that it now formats like what is found on the left of this page http://www.designalt.co.nz/jml/tractors-machinery/
How can I make the 'new tractors, used tractors, etc etc..' use the Menu2 CSS formatting?
| 1250 Views | ||
|
Page:
1
|
Go to Top |


