Topic: displaying HOME in menu (working dropdown system)

Hi Guys,

It's me again i'm afraid, managed to fix loads of issues with my CSS so the site is looking better now, however I'm stuggling to get the menu system to display HOME before the main page drop downs...

http://tinyurl.com/yewg6v7

It should display HOME NORTHERN IRELAND ETC ETC....

Im using:

<?php function snippet_menuh($parent){    
    $out = '';    $childs = $parent->children();
        if (count($childs) > 0)    {        
        $out = '<ul>';        
foreach ($childs as $child)            
    $out .= '<li>'.$child->link().snippet_menuh($child).'</li>';
    $out.= '</ul>';    
    
    }    
return $out;
}
?>

<ul id="nav-m"><?php echo snippet_menuh($this->find('/')); ?></ul>

Any ideas?

Last edited by wickedwebsites (2010-05-05 19:10)

Thumbs up

2

Re: displaying HOME in menu (working dropdown system)

wickedwebsites wrote:

... I'm stuggling to get the menu system to display HOME before the main page drop downs...

Sadly (?), I think it's simply a matter of adding it in! Just change your last line to this:

<ul id="nav-m">
<li><a href="<?php echo URL_PUBLIC; ?>">Home</a></li>
<?php echo snippet_menuh($this->find('/')); ?>
</ul>

You'll see that this is the way the default navigation does it. Nice to see you're almost there! smile

Re: displaying HOME in menu (working dropdown system)

omg, Im so thick!

That worked - thank you smile

I spent a few hours messing about with the code today lol, then I got shot-down on a CSS forum, for using tables lol... but its the easiest way to get the layout I'm looking for smile

Its looking quite good now in FF and Safari, not checked it yet in IE lol.... need to get it working properly lol!

Thumbs up

Re: displaying HOME in menu (working dropdown system)

By the way... you may want to remove/change the favicon before presenting it to your client. wink (remove the one in the root directory of Wolf)

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: displaying HOME in menu (working dropdown system)

ah yes, well I'm doing a custom one for him smile

I'm still working on the product plugin - coming along nicely smile

Although for some reason since playing in the code I've wrecked the nopcart cart sad what a pain lol smile

Thumbs up