Monday, March 21, 2016

Magento Change Pager Phtml Custom Module



In you block of custom module, for e.g.In my case,  Netgo_Userstatus_Block_Userstatus_List

Just Use the blow code in _prepareLayout() function

  protected function _prepareLayout()
{
        parent::_prepareLayout();
        $pager = $this->getLayout()->createBlock(
            'page/html_pager',
            'netgo_userstatus.userstatus.html.pager'
        )->setTemplate('page/html/newsfeed_pager.phtml')
        ->setCollection($this->getUserstatuss());
        $this->setChild('pager', $pager);
        $this->getUserstatuss()->load();
        return $this;
    }

The Red colored is the extra code that I have added, you can define your phtml file for the pager.

No comments:

Post a Comment