GoDark MyBB Theme v2 version is now released. Check details here
How to add items to a dropdown menu
#1
Regards.

I want to add a dropdown menu in the Welcome block and add this items

{Avatar} Bienvenido User -> CP Usuario
                                        -> Panel de moderación
                                        -> Panel de moderación
                                        -> Panel de administración
                                        -> Cerrar Sesión


I have this code:

Code:
<div  class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
            <li class="dropdown-menu"><a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}">{$mybb->user['username']}</a>
                <ul>
                    <li><a href="{$mybb->settings['bburl']}/usercp.php"><i class="fa fa-filter" style="color: #b0d4e3;"></i>Panel Usuario</a></li>
                    {$modcplink}
                    {$admincplink}
                <div  class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
            <li class="dropdown-menu"><a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}">{$mybb->user['username']}</a>
                <ul>
                    <li><a href="{$mybb->settings['bburl']}/usercp.php"><i class="fa fa-filter" style="color: #b0d4e3;"></i>Panel Usuario</a></li>
                    {$modcplink}
                    {$admincplink}
                    <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}"><i class="fa fa-power-off"  style="color: #c1eca5;"></i> Cerrar Sesión</a></li>
                </ul>
            </li>
        </ul>
    </div>

Am I on the right way?.

How I could to add CSS without damage theme?

My website is: https://www.forodinero.net

Thanks for your help
Reply
#2
Hey duende,
The best way is to convert the menu to a dropdown which shouldn't be too difficult. Refer to the default dropdown in your focus theme and reuse the code after changing the name of classes.
This will help you to quickly add a dropdown to the desired place.

Regards
WallBB
Reply




Users browsing this thread: 1 Guest(s)