商品列表模板存放在模板包archive文件夾中,命名以list_product為前綴
在模板包中找到list_product.html 模板,復制另存為一個新模板,命名為list_product_自定義名稱.html
自定義名稱可以是英文或拼音,但不能用中文!
所有列表頁面模板布局主要分三部分,頁頭/頁中/頁底。

{template 'header.html'}商品列表模板主要顯示欄目內(nèi)容列表,并以文字列表形式顯示。
{loop $archives $archive}
{$archive['title']}//內(nèi)容標題
{$archive['url']}//內(nèi)容鏈接
{$archive['thumb']}//內(nèi)容縮略圖商品地址
{$archive['attr2']}//價格
{/loop}{template 'footer.html'}商品中引用欄目所屬內(nèi)容列表循環(huán)舉例
{loop $archives $archive}
<a href="{$archive['url']}" class="img-auto">
<img class="img-responsive" alt="{$archive['stitle']}" src="{$archive['thumb']}" onerror='this.src="{config::get('onerror_pic')}"' /></a>
{/loop}列表中內(nèi)容名稱
{$archive['title']}列表中內(nèi)容鏈接
{$archive['url']}列表中內(nèi)容鏈接Title
{$archive['stitle']}列表中內(nèi)容價格
{$archive['attr2']}列表中內(nèi)容折扣價格
{$archive['oldprice']}列表中內(nèi)容價格單位
{lang('unit')}列表中內(nèi)容評級
{$archive['strgrade']}內(nèi)容簡介
{$archive['intro']}內(nèi)容縮略圖
{$archive['thumb']}發(fā)布時間
{$archive['adddate']}瀏覽次數(shù)
{$archive['view']}限定引用內(nèi)容文字數(shù)量
{cut(strip_tags($archive['content']),20)}其中20為字數(shù)
列表分頁
{if isset($pages)}
{category_pagination($catid)}
{/if}分頁代碼必須放置在{loop}外部!
用 CmsEasy 助您「輕松搭建」企業(yè)官網(wǎng)。