How to list folder contents in plone-2.1 on the basis of creation date?
In Plone whenever a content is added it get displayed in the end of folder listing. It creates a lot of problem while searching for that content if the number of contents are large in number .
To overcome this drawback we have to change plone default ordering of folder contents on the basis of their 'Creation Date'.
Make the following changes in portal_skins/plone_scripts/getFolderContents :
<!-Replace the following code with the below given code --------->
if not contentFilter.get('sort_on', None):
contentFilter['sort_on'] = 'getObjPositionInParent'
<------------------------------------------------------------------>
if not contentFilter.get('sort_on' ,None ):
contentFilter['sort_on'] = 'created'
if not contentFilter.get('sort_order' ,None ):
contentFilter['sort_order'] = 'reverse'
NOTE:
Sorting is done in two steps:
1) In the above code sorting is done on the basis of creation date by using ---> sort_on = 'created'
2) reverse list using ----> sort_order ='reverse'
