cancel
Showing results for 
Search instead for 
Did you mean: 

Admin area page default sort

SOLVED

Admin area page default sort

I'm trying to figure out how to update the default sorting for the CMS > Page grid that displays once you click CMS > Pages. Currently it defaults to the URL Key but I'd like it to automatically sort to the Page Title (first column). I'd also like to have the number of pages default to 50 instead of 20. Is this possible? I cannot seem to find any information on the "Manage Pages" grid.

 

I'm using Magento 1.9.3.2.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Admin area page default sort

Hi @girdy1974,

 

You won't be able to change those settings without code.

As a fast solution maybe you can try this:

Make a copy of this file:

 

/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php

To:

 

/app/code/local/Mage/Adminhtml/Block/Cms/Page/Grid.php

You will need to create the directory structure.

Then you can do something like this on that file:

 

class Mage_Adminhtml_Block_Cms_Page_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

    public function __construct()
    {
        parent::__construct();
        $this->setId('cmsPageGrid');
        $this->setDefaultSort('title');
        $this->setDefaultDir('ASC');
        $this->setDefaultLimit(50);
    }

    protected function _prepareCollection()
    {

    ...

View solution in original post

2 REPLIES 2

Re: Admin area page default sort

Hi @girdy1974,

 

You won't be able to change those settings without code.

As a fast solution maybe you can try this:

Make a copy of this file:

 

/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php

To:

 

/app/code/local/Mage/Adminhtml/Block/Cms/Page/Grid.php

You will need to create the directory structure.

Then you can do something like this on that file:

 

class Mage_Adminhtml_Block_Cms_Page_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

    public function __construct()
    {
        parent::__construct();
        $this->setId('cmsPageGrid');
        $this->setDefaultSort('title');
        $this->setDefaultDir('ASC');
        $this->setDefaultLimit(50);
    }

    protected function _prepareCollection()
    {

    ...

Re: Admin area page default sort

That worked PERFECTLY!!!! Thank you so much Damian Smiley Wink