6 Replies Latest reply on Feb 23, 2012 9:38 AM by christopher.cox@yum.com

    anyone working with new Navbar in ver. 5

      I'm wondering how to add it to my site and populate it.

        • anyone working with new Navbar in ver. 5
          Ryan Rutan

          I've written a few plugins that add buttons to the userbar?  If so, there are a few discussions about 3 weeks ago that might be helpful that I participated in regardong adding tabs which is very similar.

          Tab Selection for New Tabs


          Hope this helps.

            • Re: anyone working with new Navbar in ver. 5

              Hi there,


              The link you provided sends us to an unanswered discussion. Was that the intention?

              I am also trying to add a new custom link to the Navbar in Jive 5, and am finding it difficult to find any detailed instructions on how to do this. I am finding not much up to date info on this sort of thing.

              Any help is greatly appreciated.




            • Re: anyone working with new Navbar in ver. 5

              I'm wondering how to add it to my site...


              There's already a Navbar, which contains the following items:

              • navBarHomeLink
              • navBarActivityStreamLink
              • navBarInboxLink
              • navBarActionsLink
              • navBarAppsLink
              • navBarBrowseLink


              ...and populate it.


              If the aforementioned Navbar is the one you're talking about, you could do this as follows:


              1) For statically defined menu items, override the navBarLinks bean like so in your spring.xml file of your custom plugin:


              <bean id="navBarTestLink" class="com.yournamespace.TestLink" parent="actionLinkBase" scope="prototype">
                        <property name="ID" value="jive-nav-link-test"/>
                        <property name="nameKey" value="nav.bar.test.link"/>
                        <property name="url" value="/test"/>
                        <property name="linkCss" value="j-globalNavLink j-ui-elem"/>
              <bean id="navBarLinks" class="com.jivesoftware.community.util.spring.MergeableCollection" scope="prototype">
                        <property name="source">
                                  <util:list value-type="com.jivesoftware.community.web.component.ActionLink" scope="prototype">
                                            <ref bean="navBarHomeLink"/>
                                            <ref bean="navBarTestLink"/>
                                            <ref bean="navBarActivityStreamLink"/>
                                            <ref bean="navBarInboxLink"/>
                                            <ref bean="navBarActionsLink"/>
                                            <ref bean="navBarAppsLink"/>
                                            <ref bean="navBarBrowseLink"/>



              2) For dynamically generated menu items, you could substitute the globalNavBar bean by replacing it with your custom navBar implementation in the spring.xml file in your custom plugin. This custom navBar Implementation would need to extend com.jivesoftware.community.navbar.impl.GlobalNavBarImpl. You can then override that navBar's setLinks method and (for example) add your additional menu items before calling setLinks on super.

              • Re: anyone working with new Navbar in ver. 5
                Ryan Rutan

                Depending on the level of manipulation, you may be able to do it with JS/CSS; however, there are use-cases where the core Java elements are needed.  This topic has been discussed more recently, How to: Add a Tab to a Place .  While this isn't a NavBar Button...all the steps are relevant and relate.  This information plus Andreas Ley post above should get you in the ballpark.  Let me know if there are still questions. =)