Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Sidebar Menu(2) Issue


Go to End


2488 Views

Avatar
plushtoy

Community Member, 10 Posts

10 November 2010 at 10:29am

There is probably a very simple explanation for this (hoping). I appreciate hearing from anyone who may understand the issue.

The second level sidebar menu links work correctly when you first select a secondary page, however, once on that secondary page, when you click on another secondary link, the link is broken. It appears to be an issue with the URL as a # is added. See example below.

Example of functioning link:
http://domain.com/page-1

Example of broken link:
http://domain.com/page-1#page-2

<div id="sidebar">
	<ul id="subnav">
		  	<% control Menu(2) %>
  	    		<li><a href="$Link">$MenuTitle.XML</a>
	  			<% if LinkOrSection = section %>
	  				<% if Children %>
						<ul>
							<% control Children %>
								<li><a href="$URLSegment">$MenuTitle.XML</a></li>
							<% end_control %>
						</ul>
			 		 <% end_if %>
				<% end_if %> 
			</li> 
		<% end_control %>
	</ul><!-- #subnav -->

</div><!-- #sidebar -->