Nav/Subnav

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blade-uk
    Senior Member
    • Jan 2004
    • 532
    • 3.7.x

    [CMS] Nav/Subnav

    As you can see on vbulletin 4, when you click on home, you are greeted with a sub nav relevant to that.

    When you click on forum, you are greeted with a sub nav relevant to that (New Posts, Private Messages, FAQ etc...)

    Blogs is the same (Recent Entries etc...)

    The question i have, is that i've added some static pages on the CMS and want to add it onto the nav bar such as one called "About" and i want the nav bar to show "Advertising" and "Andy's Rig" and "Benchmarking".

    I've had to use a modification just to get the tabs to show in the nav bar, but i'm wondering if there is anything that the vb team suggest to add tabs and for the sub nav to work how i want just like the standard (Home, Forum, Blogs) functions do?

    Thanks,

    Andy
    http://www.eteknix.com/images/misc/vbulletin4_logo.png
    eTeknix.com - http://www.eteknix.com
    eTeknix Forums - http://forums.eteknix.com
  • Blade-uk
    Senior Member
    • Jan 2004
    • 532
    • 3.7.x

    #2
    Anyone? Hoping to get this move from wordpress to vbulletin cms sorted fairly soonish

    Andy
    http://www.eteknix.com/images/misc/vbulletin4_logo.png
    eTeknix.com - http://www.eteknix.com
    eTeknix Forums - http://forums.eteknix.com

    Comment

    • Lynne
      Former vBulletin Support
      • Oct 2004
      • 26255

      #3
      I'm not sure what you want from us... you either need to use a modification or write a plugin to add a new navtab. I wrote an article over on vb.org on how to write a plugin to do this, and as you said, you found a modification. Right now, that is how to add a navtab and submenu.

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools <- awesome site for html/css help

      Comment

      • reefland
        Senior Member
        • Sep 2000
        • 1131

        #4
        If you just want the page to show up in the navigation, edit the static page and chose to Make Available in Subnav. Then you can go into your sections edit page and in the subnav box chose to display that page.
        sigpic
        Nation of Blue - Kentucky Wildcats Sports


        Some CMS Goodness: Add Avatar to Article

        Comment

        • Blade-uk
          Senior Member
          • Jan 2004
          • 532
          • 3.7.x

          #5
          I've found a tab mod called vBH New Tabs Options but that only adds a main tab on the nav bar.

          I want it so that when you click on Home it says the relevant sections but when you click on About it comes up with the sections relevant to that, but nothing else.

          Examples are, as standard (on this site):

          Home subnavs are - What's NewHow To: Install/UpgradeHow To: Styling/ThemingHow To: CMS
          Forum subnavs are - New PostsPrivate MessagesFAQCalendarCommunity Forum Actions Quick Links
          Blogs subnavs are - Recent EntriesMost PopularMember Blogs

          I want a tab called about so that it's:

          About subnavs are - Advertising Andy's Rig Benchmarking Contact

          Make sense?

          Andy
          http://www.eteknix.com/images/misc/vbulletin4_logo.png
          eTeknix.com - http://www.eteknix.com
          eTeknix Forums - http://forums.eteknix.com

          Comment

          • reefland
            Senior Member
            • Sep 2000
            • 1131

            #6
            Try this out:
            Add-On Releases - Manual Add Navbar Links [Plus Image Menu] vBulletin 4.x Template Modifications
            sigpic
            Nation of Blue - Kentucky Wildcats Sports


            Some CMS Goodness: Add Avatar to Article

            Comment

            • Blade-uk
              Senior Member
              • Jan 2004
              • 532
              • 3.7.x

              #7
              Originally posted by reefland
              Took a lot at that, but it seems that the child nav (subnav) will be the same no matter what tab you are on? I want different sub navs for different tabs?

              Andy
              http://www.eteknix.com/images/misc/vbulletin4_logo.png
              eTeknix.com - http://www.eteknix.com
              eTeknix Forums - http://forums.eteknix.com

              Comment

              • Lynne
                Former vBulletin Support
                • Oct 2004
                • 26255

                #8
                I've got an article that tells you how to write a plugin to do just what you want. You will have to understand conditions though since you need to write a condition that details when the subnav shows up.

                Please don't PM or VM me for support - I only help out in the threads.
                vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                Want help modifying your vbulletin forum? Head on over to vbulletin.org
                If I post CSS and you don't know where it goes, throw it into the additional.css template.

                W3Schools <- awesome site for html/css help

                Comment

                • reefland
                  Senior Member
                  • Sep 2000
                  • 1131

                  #9
                  Another option:

                  Create a section called About. Place all of your articles in that section and write one main article and choose to Show Entire Article on Section Page. Place all of the articles in that section and chose to make them all available for subnav. Then just create a regular navbar button with a link to the About section.
                  sigpic
                  Nation of Blue - Kentucky Wildcats Sports


                  Some CMS Goodness: Add Avatar to Article

                  Comment

                  • Blade-uk
                    Senior Member
                    • Jan 2004
                    • 532
                    • 3.7.x

                    #10
                    Originally posted by Lynne
                    I've got an article that tells you how to write a plugin to do just what you want. You will have to understand conditions though since you need to write a condition that details when the subnav shows up.
                    Got a link to that article please?

                    Andy
                    http://www.eteknix.com/images/misc/vbulletin4_logo.png
                    eTeknix.com - http://www.eteknix.com
                    eTeknix Forums - http://forums.eteknix.com

                    Comment

                    • Lynne
                      Former vBulletin Support
                      • Oct 2004
                      • 26255

                      #11
                      [HOW TO - vB4] Create a New Tab in the navbar

                      Please don't PM or VM me for support - I only help out in the threads.
                      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                      Want help modifying your vbulletin forum? Head on over to vbulletin.org
                      If I post CSS and you don't know where it goes, throw it into the additional.css template.

                      W3Schools <- awesome site for html/css help

                      Comment

                      • Blade-uk
                        Senior Member
                        • Jan 2004
                        • 532
                        • 3.7.x

                        #12
                        Thanks Lynne,

                        Having some trouble with that though. I don't want a drop down menu by the way, just a few subnav links

                        My code consists of:

                        Code:
                        $tabselected = '';
                        $tablinks = '';
                        if (THIS_SCRIPT == 'About')
                        {
                            $vbulletin->options['selectednavtab']='About Us';
                            $tabselected = ' class="selected"';
                            $tablinks = '                <ul class="floatcontainer">
                                                <li><a href="http://forums.eteknix.com/content.php?100-Advertising">Advertising</a></li>
                                                <li><a href="http://forums.eteknix.com/content.php?104-Andys-Rig">Andys Rig</a></li>
                                                <li><a href="http://forums.eteknix.com/content.php?105-Benchmarking">Benchmarking</a></li>
                                                <li><a href="http://forums.eteknix.com/sendmessage.php">Contact</a></li>
                                                <li><a href="http://forums.eteknix.com/content.php?107-Support">Support</a></li>
                                        </ul> ';
                        
                        } 
                        $template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="http://forums.eteknix.com/content.php?86-about">About Us</a>'.$tablinks.'</li>' ;
                        The subnav links aren't showing at all though, as you can see here - http://forums.eteknix.com/content.php if you click on About Us, it doesn't select it either, it just goes back to the Home tab selected.

                        Andy
                        http://www.eteknix.com/images/misc/vbulletin4_logo.png
                        eTeknix.com - http://www.eteknix.com
                        eTeknix Forums - http://forums.eteknix.com

                        Comment

                        • reefland
                          Senior Member
                          • Sep 2000
                          • 1131

                          #13
                          That's because you don't have a script that is defined as 'About'. That really only works if you have a custom .php file.
                          sigpic
                          Nation of Blue - Kentucky Wildcats Sports


                          Some CMS Goodness: Add Avatar to Article

                          Comment

                          • Blade-uk
                            Senior Member
                            • Jan 2004
                            • 532
                            • 3.7.x

                            #14
                            So how would i get it working how i want?

                            Scrap that, reefland, how did you do the drop down on your site? as i'm happy with the way that it looks on Nation of Blue?

                            Andy
                            http://www.eteknix.com/images/misc/vbulletin4_logo.png
                            eTeknix.com - http://www.eteknix.com
                            eTeknix Forums - http://forums.eteknix.com

                            Comment

                            • reefland
                              Senior Member
                              • Sep 2000
                              • 1131

                              #15
                              Here you go:

                              Code:
                              <li class="popupmenu"><a href="javascript://" class="popupctrl navtab">Tab Name</a>
                              
                              <ul class="popupbody popuphover">
                              <li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.link1.com/">Link 1</a></li>
                              <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.link2.com/">Link 2</a></li>
                              <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.link3.com/">Link 3</a></li>
                              <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.link4.com">Link 4</a></li>
                              </ul>
                              </li>
                              Place that where you want it to show in the Navbar template.
                              sigpic
                              Nation of Blue - Kentucky Wildcats Sports


                              Some CMS Goodness: Add Avatar to Article

                              Comment

                              Related Topics

                              Collapse

                              Working...