1 Reply Latest reply on Aug 13, 2013 2:53 AM by jayati453

    Adding Tab to Top Navigation Bar

    sthomps

      Hello.  We are needing to add three tabs to the top-level, global navigation bar.  It would be on the same navigation level as Home, Content, People, Places, etc.  We just need some guidance on how to accomplish this (e.g., what theme files need to be edited to add these tabs).  One of the tabs will need to have a drop-down list (similar to Links and Apps) with links to other sub-spaces within the community.

       

      Has anyone successfully added a tab in that top navigation bar?  Any help or guidance is appreciated.  Thank you.

       

      -Scott-

        • Re: Adding Tab to Top Navigation Bar
          jayati453

          Hi Scott,

           

          For adding a tab into the navigation bar. You need to create a plugin and then add bean in your Spring.xml.

          For  example -

           

          <bean id="<tab-id>" class="com.plugin.tabs.action.NavBarGenStoriesAction" parent="actionLinkBase" scope="prototype">

                  <property name="ID" value="jive-nav-link-home"/>

                  <property name="nameKey" value="plugin.navbar.stories.title"/>

                  <property name="linkCss" value="j-globalNavLink j-ui-elem"/>

                  <property name="url" value="/community/stories"/>

          </bean>

           

          Values in Bold will be replaced by appropriate values.

          Along with this you need to create an action class as in the above example NavBarGenStoriesAction class have been created.

          and in this class we have overridden a boolean function isVisible().

           

          public class NavBarViedoAction  extends NavMenuLink{

            @Override

              public boolean isVisible() {

                  return true;

              }

          }

           

          Note- Along with custom beans you also need to add already existing(default navbar tabs). This way you can override the navbar.

           

          - Jayati