模板文件
1、欄目封面:模塊目錄/category.html
2、最終欄目:模塊目錄/list.html
3、自定義模板:模塊目錄/自定義文件.html
變量介紹
變量代碼 | 說(shuō)明 |
{$meta_title} | 頁(yè)面頭部標(biāo)題 |
{$meta_keywords} | 頁(yè)面頭部關(guān)鍵字,采用網(wǎng)站關(guān)鍵字 |
{$meta_description} | 頁(yè)面頭部描述,采用網(wǎng)站描述 |
$cat | 欄目的內(nèi)容數(shù)組 |
$parent | 父欄目數(shù)組 |
$related | 欄目的關(guān)系循環(huán) |
{$catid} | 欄目id |
$params | 用于搜索參數(shù)數(shù)組 |
{MODULE_URL} | 當(dāng)前模塊地址 |
{MODULE_NAME} | 當(dāng)前模塊名稱 |
{MOD_DIR} | 當(dāng)前模塊的目錄 |
欄目自定義字段,必須加上$cat.前綴,具體查看自定義字段的輸出標(biāo)簽
內(nèi)容舉例
1、調(diào)用本欄目基本信息
欄目名稱:{$cat.name} 欄目地址:{$cat.url} 欄目縮略圖:{dr_get_file($cat.thumb)} 共享欄目?jī)?nèi)容:{$cat.content} .....
2、面包屑導(dǎo)航
{dr_catpos($catid, '', true, '<li> <a href="{url}">{name}</a> <i class="fa fa-circle"></i> </li>')}
3、分頁(yè)調(diào)用當(dāng)前欄目下的數(shù)據(jù)
{list action=module catid=$catid order=updatetime page=1} 標(biāo)題:{$t.title} 截取標(biāo)題:{dr_strcut($t.title, 20)} 地址:{$t.url} 移動(dòng)端動(dòng)態(tài)地址:{dr_mobile_show_url(MOD_DIR, $t.id)} 描述:{$t.description} 縮略圖:{dr_thumb($t.thumb, 200, 200)} 原始圖:{dr_get_file($t.thumb)} 相關(guān)欄目名稱:{dr_cat_value($t.catid, 'name')} 相關(guān)欄目地址:{dr_cat_value($t.catid, 'url')} 主表自定義字段(文本字段)寫(xiě)法:{$t.字段名} {/list} 調(diào)試信息:{$sql} {$error} 分頁(yè)標(biāo)簽:{$pages}
文檔最后更新時(shí)間:2017-11-03 09:59:26