hello all
Looking at this code above thinking it's the closest to what i want to achieve.
What i have so far...
<ul id="nav">
<li<?php echo url_match('/') ? ' class="active"': ''; ?>><a href="<?php echo URL_PUBLIC; ?>">Home<span></span></a></li>
<?php foreach($this->find('/')->children() as $menu): ?>
<li<?php if ($menu->children() && $menu->slug() != 'seo-articles') { echo in_array($menu->slug, explode('/', $this->url)) ? ' class="active"': null; } ?>>
<?php echo $menu->link($menu->title.'<span></span>'); ?>
<?php if ($menu->children() && $menu->slug() != 'seo-articles') : ?>
<ul class="subnav">
<?php foreach($menu->children() as $child) : ?>
<li<?php echo in_array($menu->slug, explode('/', $this->url)) ? ' class="active"': null; ?>><?php echo $child->link() ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
there are 2 elements that I would like to happen...
ok, solved 2 of my bugs... but still have, active being added to all '.subnav' li's
ideally want to have the class 'dualrow' written in the top most ul (#nav) only when there is an active li in the ul.subnav to avoid the mouse-over (the spans display block when containing li has 'active'&'hover' state) overlapping the active ul.subrow.
I haven't got the the bug testing stage but the last time I checked it looked reasonable in later versions of IE.
thanks for anything.
==============
Well I have got it doing what i wanted mostly...
<ul id="nav">
<li<?php echo url_match('/') ? ' class="active"': ''; ?>><a href="<?php echo URL_PUBLIC; ?>">Home<span></span></a></li>
<?php foreach($this->find('/')->children() as $menu): ?>
<li<?php if ($menu->link() && $menu->slug()) echo in_array($menu->slug, explode('/', $this->url)) ? ' class="active"': null; ?>>
<?php echo $menu->link($menu->title.'<span></span>'); ?>
<?php if ($menu->children() && $menu->slug() != 'articles') : ?>
<ul class="subnav">
<?php foreach($menu->children() as $child) : ?>
<li<?php echo in_array($child->slug, explode('/', $this->url)) ? ' class="active"': null; ?>><?php echo $child->link($child->title.'<span></span>') ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
Last edited by Tony_mk2 (2011-02-15 04:15)