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)
精彩评论