0

In admin, I want to show custom calculations next to pager in custom module's grid.

If there is any a way to do that, please share.

Example :

Marius
199k55 gold badges431 silver badges837 bronze badges
asked Jun 30, 2016 at 14:38

1 Answer 1

1

you will need to change the template of your grid.
By default the grid is rendered with the template app/design/adminhtml/default/default/template/widget/grid.phtml

You need to add this in your grid block __construct method after calling parent::__construct().

$this->setTemplate('your_folder/grid.phtml'); 

If the method __construct does not exist, create it and make it look like this:

public function __construct($attributes=array())
{
 parent::__construct($attributes);
 $this->setTemplate('your_folder/grid.phtml'); 
}

then copy the file app/design/adminhtml/default/default/template/widget/grid.phtml to app/design/adminhtml/default/default/template/your_folder/grid.phtml

Now you can do modifications in your new file.
You should insert the code that shows your custom values right after the pager

answered Jun 30, 2016 at 14:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.