I want to add my custom arguments on categroy url. For example I have 3 custom filters (links) on the category page (red, green, yellow) and the category page url is like:


Now when a customer clicks on "red" the url should be like:


Please help me on this.

I have modified two files already: toolbar.phtml and list.phtml


This feature does exist in Magento and hence you don't want to do any extra code for do this.

Just make your category a layered category instead of a default category. That is the quick and easy solution for this. If you are confused with the terms default and layered, then

  • Default - A category which is not possible to filter down with any product attributes. For this, isAnchor property set to NO.

  • Layered - A category which can be filtered by product attributes. For this isAnchor property set to YES.

By default, if you set your category as layered, and then make your color attribute as visible in layered navigation (which you can easily do through backend), then the feature that you are looking will be automatically available for you.

Or other wise, just make your color attribute links look like this.


If you place such links for your color attribute options, then magento will automatically do a filter for you. ie links should somewhat look like this.

         <a href="www.domain.com/your-category-reference.html?color=27">Blue</a>
         <a href="www.domain.com/your-category-reference.html?color=29">Red</a>
         <a href="www.domain.com/your-category-reference.html?color=34">Green</a>

Where color attribute values are assumed for demonstration

|improve this answer|||||
  • Please check my edited question. – Krupali Mehta Jun 29 '15 at 6:09
  • That simple edit changed the full meaning of your initial question. You should do that as a new question I think – Rajeev K Tomy Jun 29 '15 at 6:13

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.