How To Add Drop Down Menus To Your Navbar
I think everyone has encountered the situation at some point or other where their navbar has got very cluttered and they are faced with either adding yet another navbar, or adding some dropdown menus to group some items.
This tutorial explains how to create an additional drop down menu in your navbar. Firstly, locate in your navbar template the first instace of Code:
<if condition="$show['popups']"> Code:
<td id="custommenu" class="vbmenu_control"> Next, in your navbar template find Code:
<!-- NAVBAR POPUP MENUS --> Code:
<div class="vbmenu_popup" id="custommenu_menu" style="display:none"> The content row should be replaced with the actual menu item that you want to have in your new drop down menu. Repeat the code Code:
<tr> If you wish to break your menu into sections like the quicklinks use then add Code:
<tr> The content added should be in the normal html format for links. If you wish to add more than one menu, repeat the process for each one, ensuring that you use a different name for each menu otherwise they will not function correctly. I hope you find this useful. |
Grr, I cant get it to go.
|
can you post the code that you are using?
|
So wait, what exactly do I put in the content area? Like if I wanted a link, I'd put:
Code:
<a href="blah"></a> See, I did all that I think and it doesn't even show up on the bar. |
you would put
Code:
<a href="URL">title</a> |
Ah yes, thats what I meant :p.
Okay, I got that, but it still isn't showing up on the navbar. Any ideas as to how I am messing up? And thanks for your time, I am not a technical guy.. I can see a link below the bar, but when I click it it just jumps to the top |
can you post your entire navbar template and I'll take a look at what you have done
|
Code:
<script type="text/javascript"> |
Code:
<script type="text/javascript"> You had put your first section in the wrong place. There are two instances of Code:
<if condition="$show[popups]"> |
Oooh, I see. Thanks!
Okay, now its in the navbar, but now it just serves as a dead link to no where... |
Code:
<script type="text/javascript"> |
I see where I messed up :). Thank you sooo much!
And if I wanted to add other links, I just have to do that simple short code or do I have to go through all that again? Cuz that isn't working either, but I hope Ill figure it out. |
The last two stages in the tutorial post explain how to add additional links. If you need any help with it, just ask.
|
quick question, i have this and it works great.I currently have the vbradio in my navbar and it is an open in a new window code.Is there a way to have a code in the drop down that opens in a new window?
|
Yes, when add the link as normal for one that will open in an external window.
eg Code:
<a href="www.mysite.com/mypage.php" [high]target="_blank"[/high]>Visit My Page</a> |
Hmm, a link appeared up there but not the ability to have a dropdown menu. Here is the code:
HTML Code:
<script type="text/javascript"> |
Close, just one little error in there.
Find Code:
<td id="custommenu" class="vbmenu_control"> Code:
<td id="apparate" class="vbmenu_control"> |
You are a genius! Worked out perfect.
Now, I have a question. Is it possible, well I know it is but do you know, how to make a dropdown menu viewable by only one usergroup? Like admins have their menu with links to ACP, advanced members have their menu, etc. |
Use
Code:
<if condition="is_member_of($user, x)"> Or use Code:
<if condition="is_member_of($user, x, y, z)"> In both instances replace the letters with the usergroup(s) you wish to be able to see the link. If you want it shown to all members use Code:
<if condition="$show[member]"> Code:
<if condition="$show[guest]"> Code:
is_member_of Code:
!is_member_of |
Thank you so much!
|
anyone has any live examples?
|
this was very very useful for me, thanks. Had problems though in-which my theme didn't have the actual navbar button in the navbar template. But I was able to figure it all out :)
|
This worked like a charm.....I tried figuring it out myself then gave up and came over here and did a search.
Thanks for the help |
What if I just want a menu to show up in one particular forum?
<if condition="$show[('$forumid ==7')]"> Like that or no? |
Thank you for this hack ... works Great!!
|
Ultimately, when I try to make it a dropdown menu, it messes up on me. Instead of just my menu coming up, it makes my forum come up. It's annoying, how do I fix that?
|
what code are you using? Please post your code in tags and if possible provide a link to somewhere where this is happening.
|
1 Attachment(s)
Thanks for this tutorial Kerry-Anne , I decided to make a (static) forum jump menu from it. :)
|
Quote:
|
That would be done by just adding a link to each of your forums into a dropdown created using the method shown in post #1
|
Quote:
|
I would like to add another navbar on top of the one that I already have, and use the dropdown menus like that. Is this possible to do? I already have an extra navbar with links to various parts of my website, but none of them have dropdown menus.
|
One thing I don't understand is why you set it to "nohilite". Why not have it highlighted? The quick links dropdown menu has it on..It looks messy with some highlightable and others not, right?
|
I don't know why I did that. Must have been linked to a style I was working on at the time. Just might out that bit and it will work like the Quick Links with highlighting.
|
Nice post this will help me in the future. :)
|
Thank you works perfectly.
Just one question. Where would I put the code to make the custom menu show up to the right of the quick links. Inbetween the quick links and the log out area. Would I jsut move the first piece of code? |
Yes, just move the first piece to the place you want it to show.
|
Thanks for the guide!
|
Hi, Im having some trouble getting this to work. I managed to add the following codes into my navbar. Now the question is how do I create the actual link?
|
What code have you added and what are you trying to do?
|
All times are GMT. The time now is 06:23 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|