Change max items in my documents dashlet

cancel
Showing results for 
Search instead for 
Did you mean: 
pintureti
Active Member II

Change max items in my documents dashlet

Jump to solution

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 Solution

Accepted Solutions
krutik_jayswal
Senior Member II

Re: Change max items in my documents dashlet

Jump to solution

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.

7 Replies
Highlighted
krutik_jayswal
Senior Member II

Re: Change max items in my documents dashlet

Jump to solution

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
Active Member II

Re: Change max items in my documents dashlet

Jump to solution

Thanks, yes but still do the same.

krutik_jayswal
Senior Member II

Re: Change max items in my documents dashlet

Jump to solution

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
Active Member II

Re: Change max items in my documents dashlet

Jump to solution

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

krutik_jayswal
Senior Member II

Re: Change max items in my documents dashlet

Jump to solution

did not get your point

pintureti
Active Member II

Re: Change max items in my documents dashlet

Jump to solution

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

thanks Krutik

krutik_jayswal
Senior Member II

Re: Change max items in my documents dashlet

Jump to solution

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