PHPCMS V9模板設計常用變數,phpcmsv9模板變數

來源:互聯網
上載者:User

PHPCMS V9模板設計常用變數,phpcmsv9模板變數
PHPCMS V9模板設計常用變數 (2011-11-03 10:04:57)轉載▼

標籤: 雜談 分類: phpcmsv9
變數 全域 釋義
{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}

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.