9 Replies Latest reply on Jan 31, 2018 8:23 AM by cdprete

    Add Link in "Actions" in a group

    shipra

      Hello,

       

      I want to add a link in "Actions" in group.

      I found out the links are coming from ui-components.xml.To add a link do i need to override this xml. Is there any way of creating an entry from spring.xml like I have tried to add a link in manage.

       

      If overriding ui-components.xml is the only option how do I override this in my plugin.

       

      Any pointers are appreciated

       

      Cheers!

      Shipra

        • Re: Add Link in "Actions" in a group
          mcollinge

          You don't need to overlay the file.. simply add your customisations/overrides into this file;

           

          \web\src\main\webapp\WEB-INF\classes\ui-components-custom.xml

           

          We use that to add extra menu items for certain content types, or alter the behaviour of built-in menu items (like making them appear for Guest users).

            • Re: Add Link in "Actions" in a group
              mcollinge

              Oh, and if you're working purely with plugins, you can add things that were meant to go into ui-components into plugin.xml instead. This hasn't changed any time recently so any docs you find for Jive 6 upwards will still be valid (possibly since Jive 4!).

              1 person found this helpful
                • Re: Add Link in "Actions" in a group
                  shipra

                  Thanks for the prompt reply Matt

                   

                  I researched further and got couple of documents.

                   

                  In jive fu plugin we had a very nice example for links in coomunity/ social groups and projects.

                   

                   

                  jive-fu-plugin/plugin.xml at master · jivesoftware/jive-fu-plugin · GitHub

                   

                  It works like magic.

                  Thanks!

                    • Re: Add Link in "Actions" in a group
                      shipra

                      Hello ,

                       

                      A quick question. I am not able to pass the group name in the params.

                      Am I going wrong anywhere?

                      If I add this in FTL I can render the group name.

                      Any pointers.

                       

                      <component id="socialgroup-actions">

                                  <tab id="socialgroup-actions-tab">

                                      <item id="jive-link-create-socialgroup-foo" name="xxx.copy.xxx.link" cssClass="jive-icon-med jive-icon-group">

                                          <when><![CDATA[SocialGroupPermHelper.getCanContributeToSocialGroup(socialGroup, user)]]></when>

                                          <url>

                                              <![CDATA[

                                                  <@s.url action='/xxx.jspa'>

                                                      <@s.param name='selectedContainerName' value='${socialGroup.name?html}'/>

                                                  </@s.url>

                                              ]]>

                                          </url>

                                      </item>

                                  </tab>

                              </component>

                • Re: Add Link in "Actions" in a group
                  shipra

                  Hello,

                   

                  The link I added shows in the actions widget but not in the actions dropdown beside about/manage.

                   

                  Any pointers for that?

                  Thanks ,

                  Shipra

                    • Re: Add Link in "Actions" in a group
                      mcollinge

                      Ah, that menu is done differently.. via spring-etc.xml .. this is how we get an extra settings menu item to appear;

                       

                      <bean id="e14PlaceManageLinks" class="com.jivesoftware.community.util.spring.MergeableCollection" parent="placeManageLinks" scope="prototype">
                          <property name="source">
                              <util:list value-type="com.jivesoftware.community.web.component.ActionLink" scope="prototype">
                                  <ref bean="e14PlaceManageSettingsExtraLink"/>
                              </util:list>
                          </property>
                          <property name="mergeIndex" value="1"/>
                      </bean>   
                      
                      <bean id="e14PlaceManageSettingsExtraLink" class="com.premierfarnell.community.places.E14PlaceManageSettingsExtraLink" parent="actionLinkBase" scope="prototype">
                          <property name="ID" value="e14-place-link-manage-settings-extra"/>
                          <property name="nameKey" value="e14.place.manage.settings.link"/>
                      </bean> 
                      
                      2 people found this helpful
                    • Re: Add Link in "Actions" in a group
                      cdprete

                      Hi!

                      Sorry for resuming a discussion so old, but even following that example no link is displayed on the UI.

                       

                      I'm actually using Jive 9. Is something maybe changed?

                       

                      Am I doing something wrong? Here there is a Pastebin as reference: https://pastebin.com/tYFHHjSw

                       

                      Thanks