<<>reference
name
=
"content"
>
<<>block
type
=
"catalog/product_list"
name
=
"featured"
template
=
"catalog/product/list.phtml"
>
<<>action
method
=
"setCategoryId"
><<>category_id
>[category id here]<
category_id
><
action
>
<
block
>
<
reference
>
我们在magento后台新建一个分类,向这个分类中添加的产品会在首页显示。在magneto成功添加一个分类后,会给这个分类分配一个ID。红色部分“category_id”的值“3”既是此分类ID。“list.phtml”既是此产品列表的模板样式文件。
首页产品数量控制
产品列表也的产品是可以后台设置的,也可以xml中设置, xml设置的要不后台设置优先级高
count() ?>
getColumnCount(); ?>
3): break; endif;?>