Return to Jive Software

783 Views 8 Replies Last post: Jul 15, 2009 7:13 AM by Todd West RSS
Ken Domen Beginner 300 posts since
Sep 28, 2007
Currently Being Moderated

Jul 7, 2009 2:58 PM

Is there a way to hide your own tab based on groups?

in plugin.xml, we have our own bnx tab:

 

<components>
        <component id="community-tabs">
            <tab id="community-tab" name="LIBRARY"  
                 description="BNX11" cssClass="jive-link-community">
                   <url><![CDATA[<@s.url value="bnxentry.jspa"/>?community=${community.ID?c}]]></url>
            </tab>
        </component>
</components>

 

Is there a way to hide this tab based on groups?

 

thanks!

ken


Tags: tab, tabs, hide, hiding, plugin.xml
Todd West Jive Employee 15,918 posts since
Jul 14, 2008
Currently Being Moderated
Jul 7, 2009 3:48 PM in response to: Ken Domen
Re: Is there a way to hide your own tab based on groups?

Hey Ken,

 

Try something like this out:

 

<components>
        <component id="community-tabs">
            <tab id="community-tab" name="LIBRARY" 
                 description="BNX11" cssClass="jive-link-community">

                   <url><![CDATA[<@s.url value="bnxentry.jspa"/>?community=${community.ID?c}]]></url>
                   <when><![CDATA[GroupManager.group.member(user)]]></when>
            </tab>
        </component>
</components

 

You might need to play with it a but, but I think that should work.

 

-Todd

Todd West Jive Employee 15,918 posts since
Jul 14, 2008
Currently Being Moderated
Jul 8, 2009 5:43 PM in response to: Ken Domen
Re: Is there a way to hide your own tab based on groups?

Alright, hmm. I'll bet the logic may be off a little bit and might require a little bit of tweaking. If you want to go the other route for now, thats cool too. Thanks!

 

-Todd

Todd West Jive Employee 15,918 posts since
Jul 14, 2008
Currently Being Moderated
Jul 9, 2009 12:16 PM in response to: Ken Domen
Re: Is there a way to hide your own tab based on groups?

Hmm, what if you do something like:

 

<tab id="community-tab" name="LIBRARY" role="systemAdmin"
                 description="BNX11" cssClass="jive-link-community">

                   <url><![CDATA[<@s.url value="bnxentry.jspa"/>?community=${community.ID?c}]]></url>
                   <when><![CDATA[jiveContext.groupManager.group("my_group_name").member(user) == true]]></when>
</tab

 

If I am reading this code correctly it should:

 

1) Get the jiveContext

2) Get the GroupManager

3) Get the group you are trying to check

4) Check the isMember(user) method of the group

 

 

-Todd

Todd West Jive Employee 15,918 posts since
Jul 14, 2008
Currently Being Moderated
Jul 15, 2009 7:13 AM in response to: Ken Domen
Re: Is there a way to hide your own tab based on groups?

Excellent! I'm happy to hear it

 

 

I forgot that the UI components doesn't strip off the "get" or "is" from the front of methods like freemarker does.

 

-Todd

More Like This

  • Retrieving data ...

Bookmarked By (2)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.