sort page results by creation date (#786)

This commit is contained in:
Frédéric Péters 2011-11-15 16:35:40 +01:00
parent dcc7b7869d
commit c90df39ea3
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ class SearchForm(form.Form):
return []
return catalog(
portal_type=['Document', 'File', 'Folder', 'Link'],
SearchableText=data.get('SearchableText'))
SearchableText=data.get('SearchableText'),
sort_on='created', sort_order='descending')
def doc_results(self):
catalog = getToolByName(self.context, 'portal_catalog')