Toolbar Product Grid – How to Disable or Remove Pager in Toolbar Above Product Grid

toolbar

How can I remove the "pager" above the Product-Grid Page catalog/view.phtml from "toolbar"? I need the sorter above and below the products, but the "pager" only at page-bottom. It must be in catalog.xml … I don't know it exactly.

Best Answer

You can do this by modifying catalog/product/list.phtml and catalog/prodct/list/toolbar.phtml from your theme.

First, the changes in catalog/product/list/toolbar.phtml.
Wrap the div with class pager in this if statement (the full div element not just the tag opening line):

<?php if (!$this->getHidePager()) : ?>
   <!-- <div class="pager"> here -->
<?php endif;?>

now in catalog/product/list.phtml replace this line at the top of the file:

<?php echo $this->getToolbarHtml() ?>

with this one:

<?php echo $this->getToolbarBlock()->setHidePager(true)->toHtml();?>

and the same line at the bottom of the file with this one:

<?php echo $this->getToolbarBlock()->setHidePager(false)->toHtml();?>
Related Topic