I’m currently trying to modify the pagination template (/app/design/frontend/default/mytheme/template/page/html/pager.phtml) to only show the pagination links and a link that toggles between paginated and showing all items on a single page.
I’ve got the latter figured out:
<div class="show-all-toggle">
<a class="show-all" href="<?php echo $this->getLimitUrl('all') ?>">Show All</a>
</div>
And I know how to get a list of all available pagination limits:
$this->getAvailableLimit();
However, I can’t get the default limit that’s been set in the admin backend.
I’m really not clear on the relationship between templates and block classes, but this template is associated with Mage_Page_Block_Html_Pager, so I know that $this has all the member variables and functions of that class.
I also know that Mage_Adminhtml_Block_Widget_Grid has a property called $_defaultLimit, which should be the default pagination limit set in the admin panel. But how do I access this class property from a different template? Or am I going about this completely the wrong way?
If your pager block is inside
<block type="catalog/product_list_toolbar" ...– you can try$this->getParentBlock()->getDefaultPerPageValue().