I currently have an admin grid view per file structure/code as below;


public function __construct()
    $this->_controller = 'adminhtml_things';
    $this->_blockGroup = 'things';
    $this->_headerText = Mage::helper('things')->__('Things Grid');
    $this->_addButtonLabel = Mage::helper('things')->__('Create Enhanced News Item');


public function __construct()

    //... (Sorts etc)


protected function _prepareCollection()
    $collection = Mage::getModel('things/things')->getCollection();

    //Use this in another Grid to filter
    //$collection->addFieldToFilter('customer_id', array('notnull' => true));
    return parent::_prepareCollection();

protected function _prepareColumns()

    //... (columns)

   return parent::_prepareColumns();


public function indexAction() {



public function gridAction() {




    <reference name="content">
        <block type="things/adminhtml_things" name="things" />

and all works fine and I have a populated Grid view via adminurl/things_things/index (grid view)

but how do create another Grid View with filtered collection? Do I;

  1. Copy all the Block & controller files and rename/refactor the namespace (ie Things2) and add the view into the xml layout file or;
  2. Add another view action inside the ThingsController.php & xml layout file as well as creating another Grid block File with the collection filter ie Block/Adminhtml/Things/Grid2.php
  • I have tried to copy the files and change "things" to "things2" but I get the Fatal error: Call to a member function setSaveParametersInSession() on a non-object error
    – BENN1TH
    Apr 2, 2016 at 9:50

1 Answer 1


Used option 1 and refactored/renamed copied files of all the "things" & "Things" namings to "otherthings" & "Otherthings"..

But in the copied & renamed file Block/Adminhtml/Otherthings/Grid.php

I have not changed the _blockgroup

 $this->_blockGroup = 'things';//kept module name and not changed to "otherthings" naming

as this stopped the error that i explained in the comments i was getting and successfully got a new filtered collection grid view on a new backend url..


As I only wanted to copied the Grid Files (and not the complete edit view & tab view files as not really wanting to edit two groups of file sets when file edts/improvents are needed) i needed the edit link in the grid view to point back to the original edit page url (ie adminurl/things_things/edit/id/13/key/3449574385634857) if not, I would get a 404, i changed the code in the edit column inside the copied grid file as per below;

//new copied file

//Edit Link Column point back to original edit url
$this->addColumn('action', array(
   'header' => Mage::helper('things')->__('Edit Item'),
   'width' => '100',
    'type' => 'action',
    'getter' => 'getId',
    'actions' => array(
        'caption' => Mage::helper('things')->__('Edit'),
        'url' => array(
            //point back to original edit URL
            'base' => '*/things_things/edit'
         'field' => 'id'
     'filter' => false,
     'sortable' => false,
     'index' => 'stores',
     'is_system' => true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.