[Howto] Add a Drop Down Menu to Navigation Bar

JohnnyGuitar

New Member
ever wanted to add another drop down menu on your site,wether it be for generators or random links.well heres how.

in your navbar template search for
Code:
<if condition="$show['popups']">

add this after that
Code:
<td id="custommenu" class="vbmenu_control">
    <a href="#">Custom Menu</a>
    <script type="text/javascript">
        vbmenu_register("custommenu");
    </script>
</td>

of course replacing Custom Menu with your own name and custommenu with the name that you want to give your link.

Now,in your navbar template search for
Code:
<!-- NAVBAR POPUP MENUS -->

Add this after it
Code:
<div class="vbmenu_popup" id="custommenu_menu" style="display:none" align="$stylevar[align=left]">
<table cellpadding="4" cellspacing="1" border="0">
        <tr>
            <td class="thead">Main Menu</td>
        </tr>
        <tr><td class="vbmenu_option"><a href="http://www.yoursite.com/index.php">Home</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yoursite.com/">Home</a></td></tr>
<tr>
<td class="vbmenu_option"><a href="http://www.yoursite.com/">Home</a></td></tr>
<tr>
<td class="vbmenu_option"><a href="http://www.yoursite.com/">Home</a></td></tr>
</table>
</div>
Replace the Home to what you want your link to say,and replace the url to your site or what your linking to.

repeat the code to add more link of course.

Now if you want to seperate the links as categories than add this code
Code:
<tr>
            <td class="thead">Custom Menu</td>
        </tr>

I hope you found this useful and say thanks.
 

EviL_WaLdO

New Member
thanks ill give it a shot.
i get an error. well the images look different.
any help?
uxb9h.png
 

ccmagee

New Member
JohnnyGuitar, Thanks so much been looking for a great and easy dropdown navigation and that was very easy to install!
Hats off to you thanks agn!
 

JohnnyGuitar

New Member
EviL_WaLdO said:
thanks ill give it a shot.
i get an error. well the images look different.
any help?
uxb9h.png

lol sorry i havnt replied,anyways i still havnt found the solution to that problem.as the template works fine on most themes,and i've seen that problem on a larger site and they havnt found the solution either.

but what u can try and do is,(dont know if this works,just an idea) change this
Code:
<div class="vbmenu_popup" id="custommenu_menu" style="display:none" align="$stylevar[align=left]">
<table cellpadding="4" cellspacing="1" border="0">
        <tr>
            <td class=[color=Red]"thead"[/color]>Main Menu</td>
        </tr>
        <tr><td class="vbmenu_option"><a href="http://www.yoursite.com/index.php">Home</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.yoursite.com/">Home</a></td></tr>
<tr>
<td class="vbmenu_option"><a href="http://www.yoursite.com/">Home</a></td></tr>
<tr>
<td class="vbmenu_option"><a href="http://www.yoursite.com/">Home</a></td></tr>
</table>
</div>
to navback or just nav,see if that uses the navbar image instead of the gradient_tcat
 

bluescorpion

New Member
EviL_WaLdO said:
thanks ill give it a shot.
i get an error. well the images look different.
any help?
uxb9h.png

This happens a lot in custom styles that use their own CSS classes in the navbar. The answer is to look at what class your custom style is using and use the same class in your dropsdown. The custom dropdown is using the class vbmenu_option. If you check your custom style navbar, its probably using navbar class, what ever its using, you need to change vbmenu_option to your style class.
 

JohnnyGuitar

New Member
ok i figured how to change it to match the thing lol.

see this:
Code:
[color=Red]<td class="vbmenu_control">[/color]<a href="#" id="custommenu">Main Menu</a><script type="text/javascript"> vbmenu_register("custommenu"); </script></td>

all u do is simply edit that part i put in red to this:
Code:
<td class="css_nav">
 
Top