In Alfresco 4.0, I'd like to extend Share Doclib Filter webscript to add my own customized filter.
share-config-custom.xml?
There are 2 steps involved:
Adding the link by customizing the document library with your own module(see alfresco Help):
<customization>
<targetPackageRoot>org.alfresco.components.documentlibrary</targetPackageRoot>
<sourcePackageRoot>com.company.components.documentlibrary</sourcePackageRoot>
</customization>
extend the webscripts filter.get.js and repo-filter.get.js (add them in web-extension / site-webscripts / com / company/ components / documentlibrary / )
var filters = model.filters;
filters.push(
{
id: 'myExtension',
data: '',
label: 'link.myExtension'
});
model.filters = filters;
extend the property file with your own labels
in alfresco / templates / webscripts / org / alfresco / slingshot / documentlibrary-v2 /
Copy paste the filters.lib.js and add your logic:
case "myExtension":
filterQuery = "+PATH:\"" + parsedArgs.rootNode.qnamePath + "//*\"";
filterQuery += "+@blabla\\:isLikeThat:\"FALSE\"";
filterParams.query = filterQuery + filterQueryDefaults;
break;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With