PHPCMS V9模板设计惯用变量
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
