PHPCMS V9模板設計常用變數,phpcmsv9模板變數
PHPCMS V9模板設計常用變數 (2011-11-03 10:04:57)轉載▼
| 變數 |
全域 |
釋義 |
| {CHARSET} |
√ |
字元集 |
| $SEO['title'] |
√ |
頁面標題 |
| $SEO['site_title'] |
√ |
網站標題 |
| $SEO['keyword'] |
√ |
keyword |
| {$SEO['description'] |
√ |
description |
| {CSS_PATH} |
√ |
css路徑 |
| {JS_PATH} |
√ |
js路徑 |
| {IMG_PATH} |
√ |
img路徑 |
| {APP_PATH} |
√ |
app路徑 |
| {get_siteid()} |
√ |
網站ID |
| {$siteid} |
√ |
分站URL |
| {siteurl($siteid)} |
√ |
網站URL |
| {$catid} |
|
欄目ID |
| {$pages} |
|
分頁 |
|
|
|
| {date('Y-m-d H:i:s',$r[inputtime])} |
|
更新時間 |
| {str_cut($v[description],116,'..')} |
|
截字串 |
| {thumb($v[thumb],70,60)} |
|
截縮圖 |
| {$CATEGORYS[$cid][catname]} |
|
頻道名 |
| {$CATEGORYS[$cid][url]} |
|
頻道URL |
| {template "content","footer"} |
|
模板調用 |
| {pc:block pos="index_block_1"} |
|
爭議(塊調用) |
| action:lists列表、position推薦位、category子欄目、relation相關文章、hits熱門排行榜 |
|
action |
| posid: |
|
推薦位 |
| 1首頁焦點圖推薦 |
|
posid |
| 2首頁頭條推薦 |
|
|
| 5推薦下載 |
|
|
| 8圖片頻道首頁焦點圖 |
|
|
| 9網站頂部推薦 |
|
|
| 10欄目首頁推薦 |
|
|
| 12首頁圖片推薦 |
|
|
| 13欄目頁焦點圖 |
|
|
| thumb:0所有文章、1包含縮圖 |
|
thumb |
| order:listorder DESC排序降序、listorder ASC排序升序、id DESC添加時間降序、updatetime DESC更新時間降序 |
order |
|
|
|
{pc:content
action="position" posid="2" order="listorder DESC" num="4"} |
|
news-hot |
{pc:content
action="position" posid="1"
order="listorder DESC" thumb="1" num="5"} |
|
FocusPic |
{pc:content
action="position" posid="12" thumb="1" order="id DESC" num="10"} |
|
圖片新聞 |
| {pc:content action="lists" catid="$r[catid]" num="1" thumb="1" order="id DESC" return="info"} |
|
| {pc:content action="lists" catid="$r[catid]" num="5" order="id DESC" return="info"} |
|
|
{pc:announce
action="lists" siteid="$siteid" num="2"} |
|
公告 |
{pc:special
action="lists" siteid="$siteid" elite="1" listorder="3" num="2"} |
|
專題 |
| {pc:content action="hits" catid="35" num="10" order="views DESC"} |
|
digg點擊 |
| {pc:comment action="bang" num="10" cache="3600"} |
|
評論 |
| {pc:content action="hits" catid="35" num="10" order="views DESC"} |
|
|
{pc:link
action="type_list" siteid="$siteid" linktype="1" order="listorder DESC" num="8" return="pic_link"} |
友情連結 |
| {pc:content action="lists" catid="$catid" num="25" order="id DESC" page="$page"} |
|
列表 |
| {pc:content action="hits" catid="$catid" num="10" order="views DESC" cache="3600"} |
|
總排行 |
| {pc:content action="hits" catid="$catid" num="8" order="monthviews DESC" cache="3600"} |
|
月排行 |
{pc:content
action="position" posid="5" order="listorder DESC" num="4"} |
|
推薦下載 |
|
|
|
| {catpos($catid)} |
|
欄目定位 |
| {loop subcat(0,0,0,$siteid) $r} |
|
|
| {title_style($r[style])} |
|
標題樣式 |
| {$inputtime} |
著作權聲明:本文為博主原創文章,未經博主允許不得轉載。