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.

Customising the CMS /

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

Stuck with custom .ss


Go to End
Reply


3 Posts   1263 Views

Avatar
raamklaza

Community Member, 182 Posts

8 July 2009 at 9:18am

I have the following Holder and Page.

But when i load the page i get this message:

This page contains the following errors:
error on line 140 at column 8: Opening and ending tag mismatch: div line 0 and body
Below is a rendering of the page up to the first error.

I can't find the problem :| I noticed there is an extra </div> at the and of the page...

 GamesHolder.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

		  <ul id="GamesList">
		    <% control Children %>
		      <li>
		        <div class="gamesname"><a href="$Link">$Title</a></div>
		        <div class="gamesphoto">$Photo.SetWidth(50)</div>
		        <div class="gamesdescription"><p>$Description</p></div>
		      </li>
		    <% end_control %>
		  </ul>
  		
		$PageComments	

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

GamesPage.ss
<div class="typography">
	<% if Menu(2) %>
		<% include SideBar %>
		<div id="Content">
	<% end_if %>
			
	<% if Level(2) %>
	  	<% include BreadCrumbs %>
	<% end_if %>
	
		<h2>$Title</h2>
	
		$Category
		$Description
		$Instructions
		$Content
		
		<div class="Tags">
    		Tags: $Tags
  		</div>
		
		$PageComments
		
	<% if Menu(2) %>
		</div>
	<% end_if %>

Avatar
raamklaza

Community Member, 182 Posts

10 July 2009 at 3:36am

Anyone?

Avatar
theAlien

Community Member, 131 Posts

13 July 2009 at 11:09am

Well (based on the code you posted here) I guess it's just as the error-message tells you:
You have to add an extra </div> at the end, and maybe you also have to close you're body with </body> (though that's kind of odd - it should already be done by page.ss).

A little more explanation: you're div-structure is like this:

<div class="typography">
   <div id="Content">
      <div class="gamesname"></div> // immediately closed
      <div class="gamesphoto"></div> // immediately closed
      <div class="gamesdescription"></div> // immediately closed
   </div> // closes #Content

simpy count all div's and all /div's and you can see you're missing one. And in the structure above you'll see it's the one that closes .typography

Do the same for gamespage.ss and it should be solved.