phpcms 标签

都说pc标签{pc:content
参数名="参数值"
参数名="参数值"
参数名="参数值"} 但是 参数名对应的具体参数值有那些,菜鸟就不知道了,现在就发一个PHPCMS V9内容模块PC标签调用说明!!不知道之前有没有人发,我找到的,觉得对菜鸟很有用就发了!!有需要的就看看吧!

PHPCMS V9内容模块PC标签调用说明
2011-03-10 10:08
PHPCMS V9内容模块PC标签调用说明

模块名:content

模块提供的可用操作

操作名 说明
lists 内容数据列表
relation 内容相关文章
hits 内容数据点击排行榜
category 内容栏目列表
position 内容推荐位列表

position操作说明如下:

--------------------------------------------------------------------------------

内容推荐位列表(position):

可用参数:

参数名 是否必须 默认值 说明
posid 是 null 推荐位ID
catid 否 null 调用栏目ID
thumb 否 0 是否仅必须缩略图
order 否 null 排序类型
num 是 null 数据调用数量

代码例子:

{pc:content action="position" posid="2" order="listorder DESC" num="4"}

{loop $data $key $val}

{$val['title']}


{/loop}

{/pc}

返回参数如下表:

字段 类型 空 默认 注释
title char(80) 否 NULL 推荐位标题
url char 否 NULL 推荐位链接地址
inputtime int(10) 否 NULL 推荐位发布时间
thumb char 是 NULL 推荐位缩略图
其他 不定 是 根据模型所设置的加入到推荐位中字段名称

--------------------------------------------------------------------------------

内容列表(lists):

可用参数:

参数名 是否必须 默认值 说明
catid 否 null 调用栏目ID
thumb 否 0 是否仅必须缩略图
order 否 null 排序类型
num 是 null 数据调用数量

代码例子:

{pc:content action="lists" catid="2" order="id DESC" num="4"}

{loop $data $key $val}

{$val['title']}


{/loop}

{/pc}

返回参数如下表:

字段 类型 空 默认 注释
title char(80) 否 NULL 推荐位标题
url char 否 NULL 推荐位链接地址
inputtime int(10) 否 NULL 推荐位发布时间
thumb char 是 NULL 推荐位缩略图
其他 不定 是 其他模型字段

--------------------------------------------------------------------------------

点击排行榜(hits):

可用参数:

参数名 是否必须 默认值 说明
catid 否 null 调用栏目ID
day 否 0 调用多少天内的排行
order 否 null 排序类型(本月排行- monthviews DESC 、本周排行 - weekviews DESC、今日排行 -dayviews DESC)
num 是 null 数据调用数量

代码例子:

{pc:content action="hits" catid="2" order="weekviews DESC" num="10"}

{loop $data $key $val}

{$val['title']}


{/loop}

{/pc}

返回参数如下表:

字段 类型 空 默认 注释
title char(80) 否 NULL 推荐位标题
url char 否 NULL 推荐位链接地址
inputtime int(10) 否 NULL 推荐位发布时间
thumb char 是 NULL 推荐位缩略图
其他 不定 是 其他模型字段

-------------------------------------------------------------------------------

相关文章(relation):

可用参数:

参数名 是否必须 默认值 说明
catid 否 null 调用栏目ID
relation 否 $relation 无需更改
keywords 否 null 内容页面取值:$rs[keywords]
num 是 null 数据调用数量

代码例子:

{pc:content action="relation" relation="$relation" catid="$catid" num="5" keywords="$rs[keywords]"}
{loop $data $r}
?{$r[title]}({date('Y-m-d',$r[inputtime])})

{/loop}
{/pc}

返回参数如下表:

字段 类型 空 默认 注释
title char(80) 否 NULL 推荐位标题
url char 否 NULL 推荐位链接地址
inputtime int(10) 否 NULL 推荐位发布时间
thumb char 是 NULL 推荐位缩略图
其他 不定 是 其他模型字段

--------------------------------------------------------------------------------

栏目列表(category):

可用参数:

参数名 是否必须 默认值 说明
catid 否 0 调用该栏目下的所有栏目,默认0,调用一级栏目
$siteid 否 1 默认调用系统站点
order 否 null 排序方式、一般按照listorder ASC排序,即栏目的添加顺序
num 是 null 数据调用数量

代码例子:

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

{loop $data $r}
{$r[catname]}
{/loop}

{/pc}

返回参数如下表:

字段 类型 默认值 说明
catid smallint 无 栏目ID
siteid tinyint(3) 0 站点ID
module varchar(15) 无 模块ID
type tinyint(1) 1 栏目类型ID
modelid tinyint(5) 5 模型ID
parentid smallint(5) 5 上级父栏目
arrparentid varchar(255) 无 所有父栏目
child tinyint(1) 0 子栏目
arrchildid mediumtext 无 所有子栏目
catname varchar(30) 无 栏目名称
image varchar(100) 无 栏目图片
description mediumtext 无 栏目描述
parentdir varchar(100) 无 父栏目目录
catdir varchar(30) 无 栏目目录
url varchar(100) 无 栏目链接
items mediumint(8) 0 栏目内容数
hits int(10) 0 点击数
setting mediumtext 无 栏目设置
listorder smallint(5) 0 排序
ismenu tinyint(1) 0 是否显示
sethtml tinyint(1) 0 是否生成到根目录
letter varchar(30) 无 栏目拼音

原文地址:https://www.cnblogs.com/bilibiliganbei/p/5693993.html