Home Backend Development PHP Tutorial PHPCMS V9模板设计惯用变量

PHPCMS V9模板设计惯用变量

Jun 13, 2016 pm 01:26 PM
action order

PHPCMS V9模板设计常用变量

变量

全局 释义
{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}

?

?

发布时间

?

?

转自:http://hi.baidu.com/wwp0726/blog/item/a5359823151b57469922edf7.html

1 楼 化蝶自在飞 2011-09-29  
博主也是phpcms爱好者么,可以交个朋友吗.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

DJI Osmo Action 5 Pro: Release date mooted as retailer reveals launch pricing that could undercut GoPro Hero 13 Black DJI Osmo Action 5 Pro: Release date mooted as retailer reveals launch pricing that could undercut GoPro Hero 13 Black Sep 04, 2024 am 06:51 AM

DJI has not confirmed any plans to introduce a new action camera yet. Instead, it seems that GoPro will get ahead of its rival this year, having teased that it will introduce two new action cameras on September 4. For context, these are expected to a

New DJI Osmo action camera spotted before probable summer 2024 launch to rival recent GoPro and Insta360 releases New DJI Osmo action camera spotted before probable summer 2024 launch to rival recent GoPro and Insta360 releases Jul 01, 2024 am 09:49 AM

Almost a year has passed since DJI released the Osmo Action 4 (curr. $299 on Amazon). Since then, the company has focused on its other divisions, including new RS camera gimbals. On top of that, it has introduced various drones as well like the Avata

Detailed explanation of Action asynchronous operation of Vuex state management Detailed explanation of Action asynchronous operation of Vuex state management Aug 10, 2022 pm 03:29 PM

In some cases, we want to perform some asynchronous operations in Vuex, such as network requests, which must be asynchronous. How to deal with this situation? Let me introduce to you the Action asynchronous operation of Vuex state management. I hope it will be helpful to friends in need. !

Insta360 Go 3S: New pocketable 4K action camera released weighing just 39 g with Apple Find My support Insta360 Go 3S: New pocketable 4K action camera released weighing just 39 g with Apple Find My support Jun 14, 2024 pm 06:05 PM

Insta360hasreleasedanewactioncamera,itssecondoftheyearaftertheInsta360X4(curr.$499.99onAmazon).Asexpected,thecompanyhasintroducedtheGo3S,anupgradedthatGo3thatadds4Kvideorecordingcapabilities.Specifically,whileInst

Yum! Brands expands rollout of Voice AI for faster, more accurate drive-thru orders to more Taco Bell locations Yum! Brands expands rollout of Voice AI for faster, more accurate drive-thru orders to more Taco Bell locations Aug 02, 2024 am 09:17 AM

Yum! Brands will expand the rollout of its Voice AI for faster, more accurate drive-thru orders to more Taco Bell locations this year. This follows two years of real-world testing at 100 select US locations across 13 states. The AI relieves human sta

GoPro releases new Hero 13 Black action camera with new lens mods alongside curious GoPro Hero GoPro releases new Hero 13 Black action camera with new lens mods alongside curious GoPro Hero Sep 05, 2024 am 06:45 AM

GoPro has now introduced its annual action camera refresh. Unlike in recent years, the company has decided to release two models. However, it has not returned to 360-degree cameras, despite teasing this time last year that it would replace the Max wi

How to implement elasticsearch java client action How to implement elasticsearch java client action May 22, 2023 am 08:43 AM

Most operations in elasticsearch are through corresponding actions, which are in the action package. Its structure is shown in the figure below: The above figure is a partial screenshot of the action package, which corresponds to the actions of each function. The packages of each action are also very similar to index. The implementation of these actions is also very similar. They are all basic self-actions. The following figure shows the inheritance relationship of indexaction: Because these actions do not actually implement the corresponding functions, they are just a proxy, so the implementation is also very simple. Their main function is to provide methods for creating new responses and requests and their corresponding actions.

PHP returns an array with elements in reverse order PHP returns an array with elements in reverse order Mar 21, 2024 am 10:36 AM

This article will explain in detail how PHP returns an array with the elements in reverse order. The editor thinks it is quite practical, so I share it with you as a reference. I hope you can gain something after reading this article. How to use PHP to return an array with elements in reverse order Introduction In PHP, you can easily return an array with elements in reverse order. This is useful when you need to reverse the order of a string, array, or other data. Methods There are several ways to reverse the order of elements in a PHP array. The simplest method is as follows: $originalArray=[1,2,3,4,5];$reversedArray=array_reverse($originalArray);

See all articles