Enable page sorting by Page name in list view (see #7601)

This commit is contained in:
Saophalkun Ponlu 2012-08-28 21:18:07 +12:00
parent 24b0e5dbad
commit 436972744d

View File

@ -703,6 +703,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'Created' => _t('SiteTree.CREATED', 'Date Created'),
'LastEdited' => _t('SiteTree.LASTUPDATED', 'Last Updated'),
);
$gridField->getConfig()->getComponentByType('GridFieldSortableHeader')->setFieldSorting(array('getTreeTitle' => 'Title'));
if(!$params) {
$fields = array_merge(array('listChildrenLink' => ''), $fields);