Horizontal menu of NCleanBlue template in IE6.0

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Lavrenty
New Member
New Member
Posts: 5
Joined: Sat Jan 08, 2011 2:11 pm

Horizontal menu of NCleanBlue template in IE6.0

Post by Lavrenty »

Well, IE6.0 is almost gone, but still some people are using it, so the bugs of the website in IE6.0 are better to be fixed. I'm doing a website based on a classical NcleanBlue template, but the horizontal menu is used on all pages. So I mentioned that this menu has a bug in IE6.0 - it doesn't show submenu of an active menu item. I spent a lot of time on fixing it. The result is a fixed file /htdocs/modules/MenuManager/templates/cssmenu_ulshadow.tpl
The full code is here (works correctly in IE6.0 and other browsers):

{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}

{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
{assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}

{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string='</li><li class="separator once" style="list-style-type: none;">&nbsp;</li></ul>' times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent"
{elseif $node->current == true}
<li class="menuactive"><a class="menuactive"
{elseif $node->haschildren == true}
<li class="menuparent"><a class="menuparent"
{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{else}
<li><a
{/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
{if $node->target}target="{$node->target}" {/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li><li class="separator once" style="list-style-type: none;">&nbsp;</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Horizontal menu of NCleanBlue template in IE6.0

Post by Dr.CSS »

What version of CMSMS and what did the menu template look like before hand, and you could have made a new menu template instead of changing the one in menu manager folder as it will get overwritten on any upgrade...
Post Reply

Return to “CMSMS Core”