View Full Version : How to add a Tab at Navigation bar?
Christos Teriakis
09-30-2012, 06:19 AM
Hello,
Does anybody know how I can add a new tab at navigation bar? eg beside of Home, Blogs, Groups I want to add a new tab "Classifieds".
Thank you
Chris
TheSupportForum
09-30-2012, 06:29 AM
Hello,
Does anybody know how I can add a new tab at navigation bar? eg beside of Home, Blogs, Groups I want to add a new tab "Classifieds".
Thank you
Chris
Turn Site Builder on then Click Navigation Bar
Christos Teriakis
09-30-2012, 06:48 AM
Turn Site Builder on then Click Navigation Bar
Thank you so much, but sorry as I was not clear in my post. I meants "programatically" and not as a manual entry. On vB4.2 even with manual entries you have the ability to assign a product, so it was easy to get the code by exporting the product file.
Chris
TheSupportForum
09-30-2012, 07:20 AM
Thank you so much, but sorry as I was not clear in my post. I meants "programatically" and not as a manual entry. On vB4.2 even with manual entries you have the ability to assign a product, so it was easy to get the code by exporting the product file.
Chris
i asume if you look at the examples in core/install there are a couple .xml file there that have the navigation setup example
nhawk
09-30-2012, 12:53 PM
One of the nice things about vB 5 is that admins have the ability to control the way their site looks through the use of the modules (widgets). They can place things where THEY want them, not where a coder/developer thinks they should go. So, you're better off creating a widget to hold your content and let admins place it where they want it. Even if they must create a page to hold the widget.
If you go that route, you simply need to create the module (widget) and a widget template. Then code your API to handle the info displayed in the widget.
In cases where a page must be pre-defined and nothing can be moved around on that page you need to create a page, a page template, a page route, a system widget, a widget template and a widget instance ID. In your case you would also need to add to the headernavbar column of the site table. All of that needs to be done in the install code for the product. At this time, there is no way to add a navigation link or page via the XML itself. And at this time, the widget instance ID must be created in your API. I think I got eveything there. ;)
Christos Teriakis
09-30-2012, 02:12 PM
Yes, I know it, that's why in all my vB4 addons I had a block generator so admins where able to build (almost) any type of blocks and/or widgets, and then add them in their pages. So I'm aware of this. But still believe that a main tab for holding the main listings is a must. Otherwise we're going back to vB3.7 by saying "Open template xxx and add after calendar.php this code".
Chris
nhawk
10-01-2012, 10:11 AM
Then the last paragraph of my reply applies to what you want to do.
Christos Teriakis
10-17-2012, 05:31 AM
Finally I was able to create Tab(s) using the product file. You can read my article at:
https://vborg.vbsupport.ru/showthread.php?t=289075
Omegatron
11-05-2012, 01:58 PM
Adding the tabs is easy just like adding navbar tabs the part that is missing is how to enable that tab to be the highlighted one. Any ideas on that.
Christos Teriakis
11-05-2012, 02:32 PM
Adding the tabs is easy just like adding navbar tabs the part that is missing is how to enable that tab to be the highlighted one. Any ideas on that.
In my article above I'm explaining how to add a tab automatically with a produc xml file. And believe me it was not so easy. As for highlighting it, check my dev site. The highlight works fine.
http://www.christeris.net/vb5/
Omegatron
11-05-2012, 04:16 PM
I looked at your article that did not cover how to highlight the tab.
See the issue is I am wrapping the vb header and footer around a totally separate application in another directory outside vb. Basically I use a little file I include in vb which loads the autoloader config and the templater calls to call the header footer and define the vaiables $header and $footer. I then basically include that file and my custom page outside of vb is wrapped with the vb header footer.
http://omegatron.net/vb5/photos
That should give you a hint of what I have done. I think Internet Brands things that everybody can do things with a little widget vb5 is kind of funny in a way like that. I looked at there widget thing that was hilarious.
Christos Teriakis
11-05-2012, 04:50 PM
I looked at your article that did not cover how to highlight the tab.
The tab is auto highlighting with that piece of code. As like if you have manually set the tab.
See the issue is I am wrapping the vb header and footer around a totally separate application in another directory outside vb.
Come on. vB5 is still in beta, and does not 100% works with its own enviropment. How are you expecting to work from another application?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.