我有以下内容:
<div>
<h2 class="subtitle">Featured Products</h2>
{{block type="catalog/product_list" category_id="41" template="catalog/product/list.phtml"}}</div>
<div>
...我想为其添加一个操作方法:
<action method="setColumnCount"><columns>4</columns></action>
...但是我无法在 CMS 中添加操作方法,或者我的格式不正确,有人可以帮忙吗?
谢谢保罗
最佳答案
setColumnCount
是一种方法,据我所知 CMS 指令只能指定属性。尝试直接输入值:
{{block type="catalog/product_list" column_count="4" category_id="41" template="catalog/product/list.phtml"}}</div>
(借自 here 的代码)
关于php - Magento 1.4.2 - 将操作过滤器添加到 CMS 中的 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5029392/