<?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 How to add custom filters to Share/Repository in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276815#M229945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to add custom filters in the navigation panel for Sites and Repository (similar to All Documents, I'm editing etc. but searching for custom metadata).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I implemented a new Share extension for filter - component (I mean &amp;lt;region-id&amp;gt;filter&amp;lt;/region-id&amp;gt;) and managed to display custom filters. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use BaseFilter&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;new Alfresco.component.BaseFilter("Alfresco.MyCustomFilters", …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so by clicking to my custom filter, the doc list will be refreshed with parameter filter=&amp;lt;new filter value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g.: &lt;/SPAN&gt;&lt;A href="http://localhost:8080/share/page/site/test/documentlibrary#filter=myCustomValue%7C&amp;amp;page=1" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/share/page/site/test/documentlibrary#filter=myCustomValue%7C&amp;amp;page=1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But how to extend the Repository logic, that loads the filtered data for the document list?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured out, that the filters logic is implemented here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/filters.lib.js&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Filters.getFilterParams&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case "editingMe":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterQuery = this.constructPathQuery(parsedArgs);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can overwrite this file and add my own code in filters.lib.js, but I want to avoid changing of standard Alfresco files because of further version-update problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the question is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to extend Alfresco to handle custom filter values? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vitali&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Mar 2012 20:35:57 GMT</pubDate>
    <dc:creator>webdesigner</dc:creator>
    <dc:date>2012-03-18T20:35:57Z</dc:date>
    <item>
      <title>How to add custom filters to Share/Repository</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276815#M229945</link>
      <description>Hello,I need to add custom filters in the navigation panel for Sites and Repository (similar to All Documents, I'm editing etc. but searching for custom metadata).I implemented a new Share extension for filter - component (I mean &amp;lt;region-id&amp;gt;filter&amp;lt;/region-id&amp;gt;) and managed to display cust</description>
      <pubDate>Sun, 18 Mar 2012 20:35:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276815#M229945</guid>
      <dc:creator>webdesigner</dc:creator>
      <dc:date>2012-03-18T20:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add custom filters to Share/Repository</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276816#M229946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;currently, there is no easier way to customize or add your own filters to the Repository logic - overwriting the file via the extension method (/tomcat/shared/classes/alfresco/extension/…) is the best way for this particular use case at the moment. If you properly document your changes, you should not be facing any serious upgrade issues - those webscripts tend to be relatively stable between releases.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2012 20:51:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276816#M229946</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-03-18T20:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to add custom filters to Share/Repository</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276817#M229947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Axel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think that your proposal with documentation will help in this situation. Just imagine, that you change the Core-file (filters.lib.js) and another extension is doing the same. If both extensions will be deployed (for example as AMP's) into Alfresco one extension will overwrites the changes on Core-files from another.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is required. is a properly way to add custom filters via configuration, because this is a very common scenario for a DMS system, to filter for custom metadata without leaving the document library view.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vitali&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 11:52:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276817#M229947</guid>
      <dc:creator>webdesigner</dc:creator>
      <dc:date>2012-03-19T11:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to add custom filters to Share/Repository</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276818#M229948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Vitali,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, you are right - in case extensions via AMP or JAR method want to introduce new filters, you need to have some kind of extension hook. Usually, when I modify a core Alfresco source file, I actually implement such a hook myself, even if not using an AMP extension. This is what I then include in proper documentation or even submit as patches to Alfresco, when they themselves have not yet added a feature of their own (e.g. the new Surf / Share Extensibility features, which have already addressed a large part of what I previously had to adapt).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I outlined on the other hand is the commonly accepted approach for a majority of installations / users that only have a limited business use case to address and do not make use of such extensive extensions (perhaps only Share Extras and some other dashlets). For maintainers of a DMS platform - which I am for a large pharmaceutical company - , this is not enough / suitable at all as you point out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 12:45:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-add-custom-filters-to-share-repository/m-p/276818#M229948</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-03-19T12:45:10Z</dc:date>
    </item>
  </channel>
</rss>

