cancel
Showing results for 
Search instead for 
Did you mean: 

Change max items in my documents dashlet

pintureti
Star Contributor
Star Contributor

Good morning,

Alfresco 5.

I have changed directly the code of /tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/dashlets/my-documents.get.config.xml to change the max items from 50 to 6, to show only 6 results.

<config>
<max-items>6</max-items>
<filters>
<filter type="recentlyModifiedByMe" />
<filter type="editingMe" />
<filter type="favourites" />
<filter type="synced" evaluator="syncMode.getValue() != 'OFF'" />
<filter type="syncedErrors" evaluator="syncMode.getValue() == 'ON_PREMISE'" />
</filters>
</config>

But doesn´t work. It still show in recentrlymodifiedbyme 50 results, not 6.

Have I to do something more (please, step-by-step)?

Thanks,

Jorge

1 ACCEPTED ANSWER

krutik_jayswal
Elite Collaborator
Elite Collaborator

Good finding.

You need to make changes inside  below file

share-war\components\dashlets\my-documents.js

Update below method.

getWebscriptUrl: function SimpleDocList_getWebscriptUrl()
{
  return Alfresco.constants.PROXY_URI + "slingshot/doclib/doclist/documents/node/alfresco/company/home?max=50";
},

To 

getWebscriptUrl: function SimpleDocList_getWebscriptUrl()
{
  return Alfresco.constants.PROXY_URI + "slingshot/doclib/doclist/documents/node/alfresco/company/home?max=6";
},

It is bug in alfresco , URL parameter max should be taken from config script but its not so you need to update in above file.

View answer in original post

7 REPLIES 7

krutik_jayswal
Elite Collaborator
Elite Collaborator

After making changes you need to refresh share side webscript/restart the server.You can use below url to refresh webscript.

http://localhost:8081/share/service/index 

Have you done this?

pintureti
Star Contributor
Star Contributor

Thanks, yes but still do the same.

krutik_jayswal
Elite Collaborator
Elite Collaborator

Good finding.

You need to make changes inside  below file

share-war\components\dashlets\my-documents.js

Update below method.

getWebscriptUrl: function SimpleDocList_getWebscriptUrl()
{
  return Alfresco.constants.PROXY_URI + "slingshot/doclib/doclist/documents/node/alfresco/company/home?max=50";
},

To 

getWebscriptUrl: function SimpleDocList_getWebscriptUrl()
{
  return Alfresco.constants.PROXY_URI + "slingshot/doclib/doclist/documents/node/alfresco/company/home?max=6";
},

It is bug in alfresco , URL parameter max should be taken from config script but its not so you need to update in above file.

pintureti
Star Contributor
Star Contributor

Sorry, do the same. I'm testing with existing users.

did not get your point

pintureti
Star Contributor
Star Contributor

done!!! I have changed too "?max=50" for "?max=6" in my-documents-min.js.

thanks Krutik

Ideally it should not have been changed in *-min.js , it should be in my-documents.js and then compressed.