I know there are more than a way to change the number of products in a row on category view page.
One way to do so is to open catalog.xml and changing the number in following code:
<action method="setColumnCount"><count>4</count></action>
However as I am learning Magento, I learned that you shouldn't change Magento XML files and instead you should create a local.xml file and put all your changes inside it.
Following this logic I added following code to my local.xml file to change the number of products in a row to 3:
<catalog_category_layered translate="label">
<reference name="content">
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<block type="core/text_list" name="product_list.name.after" as="name.after" />
<block type="core/text_list" name="product_list.after" as="after" />
<action method="setColumnCount"><count>3</count></action>
</block>
</block>
</reference>
</catalog_category_layered>
This works, however the problem is that as the same code (however with number 4) also excists in catalog.xml if you open any of catalog view pages the product grid is showing twice!
What is the right way to change the number of products in a row? Is it ok if I just replace 4 with 3 in catalog.xml?
Thanks