技錄生活

了解行業(yè)最新資訊,把握市場動(dòng)態(tài)。

2024最新版phpcms V9標(biāo)簽?zāi)0逵梅ù笕?/h3>

發(fā)布日期:2024-04-18; 點(diǎn)擊率:2478; 來源:太倉蘇易

常見獲取欄目名稱和獲取上級(jí)欄目名稱?

當(dāng)前欄目id: {$catid}?

當(dāng)前欄目名: {$CATEGORYS[$catid][catname]}?

當(dāng)前欄目目錄名: {$CATEGORYS[$catid][catdir]}?

當(dāng)前欄目url: {$CATEGORYS[$catid][url]}?

當(dāng)前欄目描述:{$CATEGORYS[$catid][description]}?

當(dāng)前欄目圖片:{$CATEGORYS[$catid][image]}"

當(dāng)前欄目的內(nèi)容數(shù): {$CATEGORYS[$catid][items]}

當(dāng)前欄目的點(diǎn)擊數(shù): {$CATEGORYS[$catid][hits]}

當(dāng)前欄目的上級(jí)欄目id: {$CATEGORYS[$catid][parentid]}

父級(jí)欄目id: $CAT[parentid];

父級(jí)欄目的所有子欄目id $CATEGORYS[$CAT[catid]][arrchildid];

其他字段:只需要改動(dòng)XXX:{$CATEGORYS[$top_parentid][XXX]}

獲取一級(jí)欄目名稱: {$CATEGORYS[$top_parentid][catname]}

獲取一級(jí)欄目url:{$CATEGORYS[$top_parentid][url]}

{template "content","header"} 一般把公用頭部文件單獨(dú)建立一個(gè)header.html

調(diào)用模板目錄 phpcms\template\content\header文件

網(wǎng)站建設(shè)

{template "content","footer"} 一般把公用頭部文件單獨(dú)建立一個(gè)footer.html

調(diào)用模板目錄 phpcms\template\content\footer文件

網(wǎng)站字符集的設(shè)置 一般國際通用的UTF-8 國內(nèi)使用的GBK 根據(jù)需求選擇字符編碼

{CHARSET}

字符集 (gbk或者utf-8)

網(wǎng)站標(biāo)題調(diào)用

{if isset($SEO['title']) && !empty($SEO['title'])}

{$SEO['site_title']}

{$SEO['keyword']}

{$SEO['description']}

{str_cut(strip_tags($r['title']),610,'…')} 過濾輸出里面的html標(biāo)簽。然后截取字符串

{strip_tags($r['title'])} 過濾html標(biāo)簽

{pc:content action="position" posid="9" order="id" num="10" cache="3600"}

{pc:content action="lists" catid="10" num="15" thumb="1" order="updatetime DESC" where="catid=10" moreinfo="1"}

{pc:content action="lists" catid="9" where="catid=9 or catid=10 or catid=11 or catid=12" num="5" order="rand()"}

action="position" 獲取推薦位數(shù)據(jù)

action="hits" 用于點(diǎn)擊排行,熱點(diǎn)

action="lists" 用于列表

action="category" 獲取子欄目數(shù)據(jù)

{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}

action="relation" 獲取相關(guān)數(shù)據(jù)

phpcms標(biāo)簽使用

{pc:content action="relation" relation="$relation" catid="$catid" num="5" keywords="$rs[keywords]"}

pc標(biāo)簽{pc:content 參數(shù)名="參數(shù)值"參數(shù)名="參數(shù)值"參數(shù)名="參數(shù)值"}

action="position"--------------對(duì)話框的類型='內(nèi)容推薦位列表'

posid="9" -------推薦位ID="9"

order="id" -----排序類型="id"

num="10" -----數(shù)據(jù)調(diào)用數(shù)量="10"

cache="3600"-------緩存="3600"毫秒

thumb="1" 獲取縮略圖

moreinfo="1" 關(guān)聯(lián)副本,獲取副表數(shù)據(jù),比如 文章閱讀次數(shù),文章來源等

order="rand() 隨機(jī)獲取指定數(shù)據(jù)

order="updatetime DESC" 按照更新時(shí)間升序 也可以u(píng)pdatetime ASC 或者catid DESC/ASC

{if $num%5==0} {/if} 判斷鍵值是5的狀態(tài)(加樣式或者其他作用)

{date('Y-m-d H:i:s',$r[inputtime])}輸出時(shí)間格式是2018-11-16 11:20:20

或者不需要時(shí)分秒{date('Y-m-d',$r[inputtime])}去掉his也可以修改中間的-修改為/那么時(shí)間格式就是2018/11/16看項(xiàng)目需求

分頁標(biāo)簽------{$pages}

文章頁標(biāo)簽

標(biāo)題-------{$title}

內(nèi)容-------{$content}

日期-------{$inputtime}

來源-------{$copyfrom}

調(diào)用文字友情鏈接

{pc:link action="type_list" siteid="$siteid" order="listorder DESC" num="10" return="dat"}

{loop $dat $v}

{$v[name]} |

{/loop}

{/pc}

調(diào)用圖片友情鏈接

{pc:link action="type_list" siteid="$siteid" linktype="1" order="listorder DESC" num="8"

return="pic_link"}

{loop $pic_link $v}

{/loop}

{/pc}

以上就是關(guān)于phpcms標(biāo)簽?zāi)0宓乃袃?nèi)容,歡迎找蘇易科技一起交流~

上一篇產(chǎn)品網(wǎng)站建設(shè)著陸頁策劃

下一篇2024年勞動(dòng)節(jié)放假通知

返回頂部