Magento – Grid view / List view based on category

categorymagento-1.7product-list

I would like to change the default grid/list view based on the category. There is 1 category I would like to change to a list view only. Is this possible through Custom Layout Update under Manage Categories?

Best Answer

The simplest and easiest to implement is to use the Custom Design tab for the category you want to force the grid / list view by entering the following in the Custom Layout Update:

Grid View:

<reference name="product_list_toolbar">
<action method="setData"><key>_current_grid_mode</key><value>grid</value</action>
</reference>

List View:

<reference name="product_list_toolbar">
<action method="setData"><key>_current_grid_mode</key><value>list</value></action>
</reference>