cancel
Showing results for 
Search instead for 
Did you mean: 

Display my custom documentLibrary following condition

lamba
Champ on-the-rise
Champ on-the-rise
Hello All,

I created a custom DocumentLibrary and I want display it below the default one on share according a condition relating to the current Alfresco space.

In fact, my custom doclib must only be displayed if the current Alfresco space is of a custom type.

I've created my custom doclib (inspired of the documentLibrary Alfresco) and it works great! I created:
- Webscript custom-documentlist with files custom-documentlist.lib.js & custm-documentlist.lib.ftl to put under the include folder
- Files custom-documentlist.js & custom-documentlist.css
- Webscript doclist to put in the "slingshot\documentlibrary"

But I do not know how to integrate it with the default documentLibrary!

Thank you for your help.
2 REPLIES 2

lamba
Champ on-the-rise
Champ on-the-rise
I succeed the integration of my custom documentLibrary on the default documentLibrary page as follow:
- I defined my custom documentLibrary as a new component Alfresco
- I added a new Surf region to the default documentlibrary template "documentlibrary.ftl":
   (the ligne:<@region id="custom-doclist" scope="template" protected=true /> under the documentlist region)
- I tied my custom component to my Surf region

But now, I have other problems:
- The tree is duplicated several times
- I think that I have also problems using the filter on my custom-documentlist.js file located in {alfresco-home}\tomcat\webapps\share\components\documentlibrary

N.B: I left all the code I found in the file "documentlist.js" creating and using the filter. More precisely in the methods onReady, onHistoryManagerReady, onChangeFilter, onFilterChanged and -updateDocList.

- In addition, I can't get the nodeType of the current node and consequently I can't display my component following a condition. Secondly, is it possible to do this through the webscript "custom-documentlist.get." located in {alfresco-home}\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary  :?:

thanks,

lamba
Champ on-the-rise
Champ on-the-rise
any idea, please!