Paul Brown
Paul Brown

Reputation: 5016

Magento 1.4.2 - Adding an action filter to a block in CMS

I have the following:

<div>
<h2 class="subtitle">Featured Products</h2>
{{block type="catalog/product_list" category_id="41" template="catalog/product/list.phtml"}}</div>
<div>

...and I want to add an action method to it:

<action method="setColumnCount"><columns>4</columns></action>

...but either I cannot add the action method here in the CMS or I am not formatting it correctly, can anyone help?

Thanks Paul

Upvotes: 2

Views: 940

Answers (1)

clockworkgeek
clockworkgeek

Reputation: 37700

setColumnCount is a method and AFAIK CMS directives can only specify attributes. Try putting the value directly:

{{block type="catalog/product_list" column_count="4" category_id="41" template="catalog/product/list.phtml"}}</div>

(Code borrowed from here)

Upvotes: 3

Related Questions