模板文件
1、欄目封面:模塊目錄/category.html
2、最終欄目:模塊目錄/list.html
3、自定義模板:模塊目錄/自定義文件.html
變量介紹
變量代碼 | 說明 |
{$meta_title} | 頁面頭部標題 |
{$meta_keywords} | 頁面頭部關鍵字,採用網站關鍵字 |
{$meta_description} | 頁面頭部描述,採用網站描述 |
$cat | 欄目的內容數組 |
$parent | 父欄目數組 |
$top | 頂級欄目數組 |
$related | 欄目的關係循環 |
{$catid} | 欄目id |
{$markid} | 用於導航關聯 |
$params | 用於搜索參數 |
欄目自定義字段,必須加上$cat.前綴,具體查看自定義字段的輸出標籤
http://help.xunruicms.com/102.html
內容舉例
1、調用本欄目基本信息
欄目名稱:{$cat.name} 欄目地址:{$cat.url} 欄目縮略圖:{dr_get_file($cat.thumb)} SEO標題 {$cat[setting][seo][list_title]} SEO關鍵字 {$cat[setting][seo][list_keywords]} SEO描述 {$cat[setting][seo][list_description]} .....
2、麪包屑導航
{dr_catpos($catid, '', true, '<a href="[url]">[name]</a> > ')}
3、分頁調用當前欄目下的數據
{module catid=$catid order=updatetime page=1} <a title="{$t.title}" href="{$t.url}">{$t.title}</a> {/module} 分頁:{$pages} 診斷:{$debug}
如果在循環體內輸出模塊內容自定義字段輸出方法,可以安裝免費的插件:https://www.xunruicms.com/shop/app/402.html
4、父欄目信息
欄目名稱:{$parent.name} 欄目地址:{$parent.url} 欄目縮略圖:{dr_get_file($parent.thumb)} .....
5、頂級欄目信息
欄目名稱:{$top.name} 欄目地址:{$top.url} 欄目縮略圖:{dr_get_file($top.thumb)} .....