0

What's the best way to get the index of the products page we are currently on?

what I mean is this:

enter image description here

Note: theoratically I could get it by parsing the URL and get the param from there (eg get the p=2 from url /magento/men/pants-denim.html?p=2), but I want a 'clean' way that will have less chance to collide with other extensions.

thanks!

1 Answer 1

0

I found the answer myself. You can get this with:

Mage::getBlockSingleton('page/html_pager')->getCurrentPage();

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.