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.



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


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.