6

I'm trying to change how the page selector works on category pages for this:

Pages

To: "Page 1 of 6"

But I cant seem to find the file the code sits in to do this. Any ideas?

5

Refer this link to understand about how to add pagination (it helps to understand the concept).

If you are looking to customize, take a look the below block and temaplates

Block

<magento-root>/app/code/Magento/Theme/Block/Html/Pager.php

                         or

<magento-root>/vendor/magento/module_theme/Block/Html/Pager.php

Template:

<magento-root>/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml

                        or

<magento-root>/vendor/magento/module_theme/view/frontend/templates/html/pager.phtml

you can find the declaration of block in layout here <magento-root>app/code/Magento/Catalog/view/frontend/layout/catalog_category_view.xml

<block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/>
  • Is this for Magento 1.x? – Mark Aug 17 '16 at 12:10
  • no @Mark this is magento 2.x :-) .updated my question please check – Bilal Usean Aug 17 '16 at 12:15
  • Thank you that makes more sense to me now. I'll take a look thanks :) – Mark Aug 17 '16 at 12:19
  • hi @Bilal, need help in the same issue...im trying to override the pagination from my custom theme...but im not able to get ... magento.stackexchange.com/questions/133188/… – Sushivam Aug 26 '16 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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