TOC display problem CMSimple-XH 151

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
jadefusion
Posts: 8
Joined: Tue Oct 26, 2010 8:38 am
Location: Adelaide

TOC display problem CMSimple-XH 151

Post by jadefusion » Wed Feb 01, 2012 7:14 am

I was upgrading a site to CMSimple-XH 151 when I noticed the following problem with menu display using the toc() function. A vertical menu with rollovers did not display as it did in CMSimple 142. There was more padding around each menu item than there should have been.

On investigation the problem seems to lay with the way the list-item class 'sdocs' is assigned to list-items for menus in CMSimple 151.

In CMSimple-XH versions, prior to version 151, the 'sdocs' class, styles the list-item that shows the 'title text' of the selected page. The 'title text' does not form a link.

The code examples below show...
The code added to the template to display the menu
The code produced by CMSimple-XH 142 and CMSimple-XH 151
The menu CSS used

You can see from the example "CMSimple-XH 151 - 'Page01' page selected" that the 'sdocs' class has been incorrectly applied to the list-item with the 'title text' Welcome.

Code: Select all

Code added to Template to display menu.
<!-- Start Navigation -->
<div id="mmenu1">
<?php echo toc(1);?>
<?php echo toc(2);?>
<?php echo toc(3);?>
</div>
<!-- End navigation -->



CMSimple-XH 142 and CMSimple-XH 151 - 'Welcome' page selected
<!-- Start Navigation -->
<div id="mmenu1">
<ul class="menulevel1">
<li class="sdocs">Welcome</li>
</ul>
<ul class="menulevel2">
<li class="doc"><a href="/?Welcome_to_CMSimple_XH/Page01">Page01</a></li>
<li class="doc"><a href="/?Welcome_to_CMSimple_XH/Page02">Page02</a></li>
<li class="doc"><a href="/?Welcome_to_CMSimple_XH/Page03">Page03</a></li>
</ul>
</div>
<!-- End navigation -->


CMSimple-XH 142 - 'Page01' page selected
<!-- Start Navigation -->
<div id="mmenu1">
<ul class="menulevel1">
<li class="docs"><a href="/?Welcome">Welcome</a></li>
</ul>
<ul class="menulevel2">
<li class="sdoc">Page01</li>
<li class="doc"><a href="/?Welcome/Page02">Page02</a></li>
<li class="doc"><a href="/?Welcome/Page03">Page03</a></li>
</ul>
</div>
<!-- End navigation -->


CMSimple-XH 151 - 'Page01' page selected
<!-- Start Navigation -->
<div id="mmenu1">
<ul class="menulevel1">
<li class="sdocs"><a href="/?Welcome">Welcome</a></li>
</ul>
<ul class="menulevel2">
<li class="sdoc">Page01</li>
<li class="doc"><a href="/?Welcome/Page02">Page02</a></li>
<li class="doc"><a href="/?Welcome/Page03">Page03</a></li>
</ul>
</div>
<!-- End navigation -->



CSS - for the Vertical Menu
#mmenu1	ul    { padding: 0; margin: 0; list-style-type: none; margin-bottom:15px;}
#mmenu1	ul li { padding: 0 0; margin: 0; border-bottom: solid 1px #fff; }
#mmenu1 li.sdoc {
	display: block;
	background: #666;
	color: #fff;
	padding: 6px 0 6px 12px;
	margin: 0px 0px 0px 0px; 
	text-decoration: none;
	font-weight:normal;
}
#mmenu1 li.sdocs {
	display: block;
	background: #666;
	color: #fff;
	padding: 6px 0 6px 12px;
	margin: 0px 0px 0px 0px; 
	text-decoration: none;
	font-weight:normal;
}
#mmenu1 li.doc {
	display: block;/
	background: #ffffff;
	color: #000099;
	margin: 0px 0px 0px 0px; 
	text-decoration: none;
	font-weight:normal;
}

#mmenu1 li.docs {
	display: block;
	background: #ffffff;
	color: #000099;
	margin: 0px 0px 0px 0px; 
	text-decoration: none;
	font-weight:normal;
}

#mmenu1	a {
	display: block;
	background: #770000;
	color: #fff;
	padding: 6px 0 6px 12px;
	margin: 0px 0px 0px 0px; 
	text-decoration: none;
	font-weight:normal;
	border:none;
}

#mmenu1	a:hover {
	color: #fff;
	background: #666;
}

Cheers
jBD

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: TOC display problem CMSimple-XH 151

Post by Gert » Wed Feb 01, 2012 8:42 am

jadefusion wrote:On investigation the problem seems to lay with the way the list-item class 'sdocs' is assigned to list-items for menus in CMSimple 151.
Try to set Sdoc (CMS Configuration under "Menu") to empty value.

Since CMSimple_XH 1.5 Sdoc is set to "parent" as default value, that causes the classes sdoc or sdocs for the active branch,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

jadefusion
Posts: 8
Joined: Tue Oct 26, 2010 8:38 am
Location: Adelaide

Re: TOC display problem CMSimple-XH 151

Post by jadefusion » Wed Feb 01, 2012 9:24 am

Worked like a charm...

Thank you Gert.
jBD

Post Reply