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?

1 Answer 1

6

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"/>
4
  • Is this for Magento 1.x?
    – Mark
    Commented Aug 17, 2016 at 12:10
  • 1
    no @Mark this is magento 2.x :-) .updated my question please check Commented Aug 17, 2016 at 12:15
  • Thank you that makes more sense to me now. I'll take a look thanks :)
    – Mark
    Commented Aug 17, 2016 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
    Commented Aug 26, 2016 at 11:19

Your Answer

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

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