• Welcome to Simple Machines Community Forum. Please login or sign up.
October 24, 2021, 09:57:02 PM


Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Dropmenu for main menu too?

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

Previous topic - Next topic


February 23, 2009, 07:30:13 AM Last Edit: February 23, 2009, 10:43:49 PM by $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:
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


This might do it:

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


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


February 24, 2009, 12:58:50 PM #3 Last Edit: February 24, 2009, 01:00:46 PM by 6aro
$p00ky look Manual Install Instructions for SMF 2.0RC1

Marcus Forsberg

That link doesn't work I'm afraid.


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