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
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
thanks! I'll give it a shot.
here are the other references I checked out for this particular issue:
in 2.5.2, it's not working.
I might have to just put the logic in community.ftl when it's rendering the tabs.
I really didn't want to do that but I just need to get it working for deployment.
thanks!
ken
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
i tried this:
<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.member(user) == true]]></when>
</tab>
but I get this error:
freemarker.core.InvalidReferenceException: Expression tem.when?default('true')?eval is undefined on line 739, column 27 in template/global/include/jive-macros.ftl.
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
yes. you're right.
this totally works. Not authorized to view the specified thread 51801 is not needed
<tab id="test" name="testing">
<when><![CDATA[jiveContext.getGroupManager().getGroup(Support).isMember(user)]]></when>
</tab>
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
Jive combines collaboration software, community software & social networking software into the leading SBS solution.
© Copyright 2000–2009 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205