View Full Version : Replace FAQ in NavBar with new Link similiar to community
Wyzrd
02-17-2009, 02:23 AM
I want to replace the FAQ link in the navbar with a drop down menu like on the community link. I want the new link to be call affiliates. Then have it dropdown to show a list of other sites.
TigerC10
02-17-2009, 02:48 AM
You'll have to edite the template. To do that...
Admin CP > Styles and Templates > Style Manager > Your Style > Edit Templates > Navigation / Breadcrumb Templates > navbar
Look for this code:
<td class="vbmenu_control"><a rel="help" href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
Replace it with:
<td class="vbmenu_control"><a id="affiliates" href="$show[nojs_link]#affiliates" rel="nofollow" accesskey="6">Affiliates</a> <script type="text/javascript"> vbmenu_register("affiliates"); </script></td>
Then find this code:
<if condition="$show['communitylink']">
Add this code above it:
<!-- affiliates link menu -->
<div class="vbmenu_popup" id="affiliates_menu" style="display:none;margin-top:3px" align="$stylevar[left]">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">Our Affiliates</td></tr>
<tr><td class="vbmenu_option"><a href="http://www.google.com/">Google</a></td></tr>
</table>
</div>
<!-- / affiliates link menu -->
Repeat the code in red for each website you want listed in there. Optionally, you can add vbphrases for the word "Affiliates" and/or "Our Affiliates" replace it accordingly.
Wyzrd
02-17-2009, 03:08 AM
Thanks. I knew it was a template edit but I wasn't sure what exactly to change it to. Now one more question. How do I set it so when they click it, it opens in a new tab or window.
TigerC10
02-17-2009, 03:13 AM
Oh, my bad. I forgot about that. Edit the code in red like so:
<tr><td class="vbmenu_option"><a href="http://www.google.com/" rel="external" target="_blank">Google</a></td></tr>
The target="_blank" part is depricated so it's optional (you really don't need it) - but if you want to support some ridiculously old web browsers then leave it in there.
Dismounted
02-17-2009, 04:42 AM
A readily readable article explains how to add drop-down menus: https://vborg.vbsupport.ru/showthread.php?t=122523.
Wyzrd
02-17-2009, 09:52 AM
Thanks for all your help Tiger. Sorry Dismounted I looked and couldn't find that.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.