开发者

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>
开发者_StackOverflow

...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


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜