News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Dropmenu for main menu too?

Started by $p00ky, February 23, 2009, 07:30:13 AM

Previous topic - Next topic

$p00ky

Hello everybody,

I was wondering how can I have a main menu with sub buttons like the new admin menu?
We can define 'sub_buttons' to the main menu too, but how can we see them in the main menu?

Thanks in advance.


PS: I tried to add manually to the template_menu() function in index.template.php something like:
<?php
if (count($button['sub_buttons'])>0) {
echo '<ul>';
foreach($button['sub_buttons'] as $sub_button) {
echo '<li><a title="'$act'" href="'$sub_button['href'], '">'.$sub_button['title'].'</a></li>';
}
echo '</ul>';
}
?>

But as it's a "clearfix" menu, the result is not as desired at all...
$p00ky @ EroGaKi

Marcus Forsberg

Hello.

This might do it:
http://custom.simplemachines.org/mods/index.php?mod=1508

I'm not sure if it will work for the latest 20 verison though.

$p00ky

Oh, thanks for the link, that's what I was looking for :)

But the problem is the template_menu() function changed in 2.0RC1 since 2.0b4, so this mod is not working on 2.0RC1 for the moment.
I'm waiting for an update, thank you ;)
$p00ky @ EroGaKi

6aro

#3
$p00ky look Manual Install Instructions for SMF 2.0RC1

Marcus Forsberg

That link doesn't work I'm afraid.

6aro


Marcus Forsberg

FYI the link didn't work because the form uses POST instead of GET. it can use get (ie have the information such as mod, package and version in the URL) but I don't remember the syntax :P


Advertisement: