cancel
Showing results for 
Search instead for 
Did you mean: 

sorting content by date

thk
Champ on-the-rise
Champ on-the-rise
Hi,

all content in the folders is sorted alphabetically. How can I configure Alfresco to sort the content in a folder by date, so that the newest content documents are listed on the top in the folder.
What is the easiest way to do it without big programming I hope?

Thanks for your Help
3 REPLIES 3

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
open /alfresco/jsp/browse/browse.jsp

find <a:richList id="spacesList" binding="#{BrowseBean.spacesRichList}"
                     viewMode="#{BrowseBean.browseViewMode}"
                     pageSize="#{BrowseBean.pageSizeSpaces}" styleClass="recordSet"
                     headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
                     altRowStyleClass="recordSetRowAlt" width="100%"
                     value="#{BrowseBean.windowsView}" var="r"
                     initialSortColumn="created">
THIS SHOULD TO IT.

thk
Champ on-the-rise
Champ on-the-rise
Many thanks!

It works but the code what you posted just sorts the spaces.
To sort the files in the spaces you
have to change the contentRichList not the spacesList
and to get descending order (=newest file first)
it has to be
<a:richList id="contentRichList" binding="#{BrowseBean.contentRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeContent}"
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
value="#{BrowseBean.content}" var="r" initialSortColumn="created" initialSortDescending="true">

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
I know, we have one list with files and spaces, like in windows to names are different but logic is the same about sorting.