<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Share - multi-select (selected items) actions based on current site in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/490476#M40211</link>
    <description>&lt;P&gt;Hi Abhinav,&lt;/P&gt;&lt;P&gt;I am using Alfresco 23.3.5 ACS and no customisation is done for multi-select actions.&lt;/P&gt;&lt;P&gt;Default Alfresco configuration for multi-select Assignworkflow action is below and it is not working as expected even though the document has&amp;nbsp;smf:smartFolderChild Aspect&lt;/P&gt;&lt;P&gt;&amp;lt;action type="action-link" id="onActionAssignWorkflow" asset="document" icon="document-assign-workflow" label="menu.selected-items.assign-workflow" notAspect="smf:smartFolder,smf:smartFolderChild"/&amp;gt;&lt;/P&gt;&lt;P&gt;I believe it is not working for lower versions also, I have never tested.&lt;/P&gt;&lt;P&gt;Please check from your side.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2025 06:01:38 GMT</pubDate>
    <dc:creator>Vilas_Reddy_Mar</dc:creator>
    <dc:date>2025-06-06T06:01:38Z</dc:date>
    <item>
      <title>Share - multi-select (selected items) actions based on current site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133082#M35855</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;BR /&gt;I need to add one action (and remove other) to multi-select but only if user is in particular site. With normal&amp;nbsp;DocLibActions this is easy - you just add evaluator but multi-select actions do not support custom evaluators. There are some "evaluators" which could be used for multi-select actions (for e.g., hasAspect) but nothing that would help me.&lt;BR /&gt;&lt;BR /&gt;Do I need to override whole multi-select component to achieve this? And if I do are there any examples of that?&lt;BR /&gt;&lt;BR /&gt;I am using ACS 5.2&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 12:34:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133082#M35855</guid>
      <dc:creator>l_hobza</dc:creator>
      <dc:date>2021-09-02T12:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Share - multi-select (selected items) actions based on current site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133083#M35856</link>
      <description>&lt;P&gt;Evaluators for multiselect would have been cleaner option, but Unfortunately evaluators doesn't work for multi-select actions like doclib actions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;permission,notAspect,hasAspect etc. could be helpful in some cases but to your specific case it will not work.&lt;/P&gt;
&lt;P&gt;You need to extend toolbar webscript and mainly extend&amp;nbsp;the &lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js" target="_self" rel="nofollow noopener noreferrer"&gt;toolbar.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/documentlibrary/toolbar.get.desc.xml" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/documentlibrary/toolbar.get.desc.xml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Your customized toolbar.js will be replaced here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/documentlibrary/toolbar.get.html.ftl#L10" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/documentlibrary/toolbar.get.html.ftl#L10&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;&amp;lt;@markup id="custom-js" target="js" action="replace"&amp;gt;
   &amp;lt;#-- JavaScript Dependencies --&amp;gt;
   &amp;lt;#-- Overridden toolbar.js --&amp;gt;
   &amp;lt;@script src="${url.context}/res/components/profile/toolbar-custom.js" group="profile"/&amp;gt;
&amp;lt;/@&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;In &lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js" target="_self" rel="nofollow noopener noreferrer"&gt;toolbar.js&lt;/A&gt;, you would have to add a customlogic to test the sitepreset or siteshortName based on selected nodes and restrict the actions as needed.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js#L1449" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js#L1449&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js#L1520" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js#L1520&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You would also be needing a repository webscript that will use SiteService to get the siteInfo -&amp;gt; siteShortName/sitePreset based on an input nodeRef.&lt;/P&gt;
&lt;P&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js#L1453" target="_self" rel="nofollow noopener noreferrer"&gt;files[0].&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;A href="https://github.com/Alfresco/share/blob/master/share/src/main/webapp/components/documentlibrary/toolbar.js#L1453" target="_self" rel="nofollow noopener noreferrer"&gt;nodeRef&lt;/A&gt; -&amp;gt; would give you the nodeRef that can be used for repository layer webscript to get the siteshortname back in reponse.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Checkout these docs for more on extending ootb components:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;A href="https://docs.alfresco.com/content-services/5.2/develop/share-ext-points/surf-extension-modules/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/5.2/develop/share-ext-points/surf-extension-modules/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.alfresco.com/content-services/5.2/develop/share-ext-points/modify-ootb-code/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/5.2/develop/share-ext-points/modify-ootb-code/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 21:51:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133083#M35856</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-09-02T21:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Share - multi-select (selected items) actions based on current site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133084#M35857</link>
      <description>&lt;P&gt;Thank you so much for your detailed solution! I managed to get it working. Instead of making the repository webscript for getting the current site I am checking if the current URL is containing the substring: /site/&amp;lt;site_name&amp;gt;/documentlibrary It seemes to me like a more performant solution since no call to Alfresco repository is needed.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 11:12:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133084#M35857</guid>
      <dc:creator>l_hobza</dc:creator>
      <dc:date>2021-09-08T11:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Share - multi-select (selected items) actions based on current site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133085#M35858</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/87477"&gt;@l_hobza&lt;/A&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you so much for your detailed solution! I managed to get it working. Instead of making the repository webscript for getting the current site I am checking if the current URL is containing the substring: /site/&amp;lt;site_name&amp;gt;/documentlibrary It seemes to me like a more performant solution since no call to Alfresco repository is needed.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Glad to hear that it worked for you. Yes that's smart option if you have a list of specific sites. If you want to rely on site types (site-presets) then you can always switch to repo call if required.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 14:40:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133085#M35858</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-09-08T14:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Share - multi-select (selected items) actions based on current site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133086#M35859</link>
      <description>&lt;P&gt;Are you sure that we can use evaluators on multi-selects? Because i read that's impossible.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 11:32:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/133086#M35859</guid>
      <dc:creator>sebastianHalik</dc:creator>
      <dc:date>2024-08-12T11:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Share - multi-select (selected items) actions based on current site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/490476#M40211</link>
      <description>&lt;P&gt;Hi Abhinav,&lt;/P&gt;&lt;P&gt;I am using Alfresco 23.3.5 ACS and no customisation is done for multi-select actions.&lt;/P&gt;&lt;P&gt;Default Alfresco configuration for multi-select Assignworkflow action is below and it is not working as expected even though the document has&amp;nbsp;smf:smartFolderChild Aspect&lt;/P&gt;&lt;P&gt;&amp;lt;action type="action-link" id="onActionAssignWorkflow" asset="document" icon="document-assign-workflow" label="menu.selected-items.assign-workflow" notAspect="smf:smartFolder,smf:smartFolderChild"/&amp;gt;&lt;/P&gt;&lt;P&gt;I believe it is not working for lower versions also, I have never tested.&lt;/P&gt;&lt;P&gt;Please check from your side.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 06:01:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-multi-select-selected-items-actions-based-on-current-site/m-p/490476#M40211</guid>
      <dc:creator>Vilas_Reddy_Mar</dc:creator>
      <dc:date>2025-06-06T06:01:38Z</dc:date>
    </item>
  </channel>
</rss>

