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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Widgets only show up one page with submenu.


Go to End


14 Posts   2930 Views

Avatar
raamklaza

Community Member, 182 Posts

25 June 2009 at 10:56am

Widgets only show up one page with submenu.

In the past i was tolled to delete the if Menu(2)....

But this tric doesn't help anymore....

Can someone help me out?

<div class="typography">
<% if Menu(2) %>
<% include SideBar %>
<div id="Content">
<% end_if %>

<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>

<h2>$Title</h2>

$Content
$Form
$PageComments

<% if Menu(2) %>
</div>
<% end_if %>
</div>

Avatar
TotalNet

Community Member, 181 Posts

25 June 2009 at 11:00am

That should work.

are you keeping <% include SideBar %> in there?

Avatar
raamklaza

Community Member, 182 Posts

27 June 2009 at 6:01am

Yes i am keeping that in there.

I tried this again: http://silverstripe.org/archive/show/224693#post224693

I removed the first check on the \Layout\Page.ss page.

Now i get this message:
XML-parsefout: niet-overeenkomende tag. Verwacht: </div>.
Locatie: http://localhost/1-Ontwikkeling/roufaida.nl/contact-us/
Regelnummer 141, kolom 3:
</body>
--^

I hope someone can help me out.

Avatar
raamklaza

Community Member, 182 Posts

28 June 2009 at 3:11am

Anyone?

Avatar
raamklaza

Community Member, 182 Posts

6 July 2009 at 9:44pm

I really would like to see widgets if there isn't a submenu :)

Can someone shine some light on this

Avatar
Willr

Forum Moderator, 5523 Posts

6 July 2009 at 10:13pm

If there is no submenu then <% if Menu(2) %> will fail. Just remove the if statement and it will always include the sidebar

Avatar
raamklaza

Community Member, 182 Posts

7 July 2009 at 3:43am

Oke that worked.

But now i always see a box on the left. (see http://www.roufaida.nl/ )

Where should i change that?

Avatar
raamklaza

Community Member, 182 Posts

8 July 2009 at 6:14am

Edited: 08/07/2009 10:50am

This is my sidebarss and my page.ss.

How can i make sure my Widgets are always visible?? And when there is no subpage it doesn't show anything from the sidebar????

Help me please :(

 Page.ss
<div class="typography">
	<% if Menu(2) %>
		<% include SideBar %>
		<div id="Content">
	<% end_if %>
			
	<% if Level(2) %>
	  	<% include BreadCrumbs %>
	<% end_if %>
	
		<h2>$Title</h2>
	
		$Content
		
		<div id="ShareThis">
		<script type="text/javascript" src="http://w.sharethis.com/button/sharetbla bla script......</script>
		</div>
				
		$Form
		$PageComments
		
	<% if Menu(2) %>
		</div>
	<% end_if %>		

	
</div>
  

 Sidebar.ss
<div id="Sidebar" class="typography">
	<div class="sidebarBox">  		
  		<ul id="Menu2">
		  	<% control Menu(2) %>
  	    		<% if Children %>
			  	    <li class="$LinkingMode"><a href="$Link" title="Ga naar de $Title.XML pagina" class="$LinkingMode levela"><span><em>$MenuTitle</em></span></a>
	  	    	<% else %>
		  			<li><a href="$Link" title="Ga naar de $Title.XML pagina" class="$LinkingMode levela"><span><em>$MenuTitle</em></span></a>
				<% end_if %>	  
	  		
	  			<% if LinkOrSection = section %>
	  				<% if Children %>
						<ul class="sub">
							<li>
				 				<ul>
								 	<span class="roundWhite">
								  	<% control Children %>
						  	  			<li><a href="$Link" title="Ga naar de $Title.XML pagina" class="$LinkingMode levelb"><span><em>$MenuTitle.LimitCharacters(22)</em></span></a></li>
 				 					<% end_control %>
 				 					</span>
			 				 	</ul>
			 				 </li>
					  	</ul>
			 		 <% end_if %>
				<% end_if %> 
			</li> 
  			<% end_control %>
  		</ul>
		<div class="clear"></div>	
	</div>	
	$Sidebar	
</div>  

Go to Top