21300 Posts in 5735 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 313 Views |
-
Drop down for subpages not showing on Nav bar

1 October 2012 at 2:29am Last edited: 1 October 2012 2:43am
I want to have a drop down for sub pages on the nav bar. I have the page visibility checked. I would think that this would generate the drop down menu under the top page displayed. I am obviously still a novice with SilverStripe. How do I create drop down menus on the navigation bar?
I am using the Cloudy Theme with SilverStripe 3.
-
Re: Drop down for subpages not showing on Nav bar

4 October 2012 at 2:45pm
Never used that theme before, but it seems it doesn't have it built in by default.
You have to setup the template to display child pages.
This shows just the 1st level of children.
<ul id="nav">
<% loop Menu(1) %>
<% if Children %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a>
<ul>
<% loop Children %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
<% end_loop %>
</ul>
</li>
<% else %>
<li><a href="$Link" title="Go to the $Title.XML page">$MenuTitle</a></li>
<% end_if %>
<% end_loop %>
</ul>You should then also use some type of script for browser compatibility like http://users.tpg.com.au/j_birch/plugins/superfish/
-
Re: Drop down for subpages not showing on Nav bar

8 October 2012 at 10:19am
Liam, Thank you for the response and advice on Superfish. I would have responded sooner but I haven't got back to work on that site yet. Prior to your response, I did get the sub page links displaying in the sidebar. I guess that is how the theme does it, however I had disabled the sidebar display before trying to create sub pages. I will go back to get it working with the drop down method. Thanks again, Rich
| 313 Views | ||
|
Page:
1
|
Go to Top |


