phpcms标签整理
2014-03-22 10:07
267 查看
1.phpcms v9 所有当前栏目信息标签
下面做总结,方便大家找到在内容页想调用的东西
当前栏目id: {$catid}
当前栏目名: {$CATEGORYS[$catid][catname]}
当前栏目目录名: {$CATEGORYS[$catid][catdir]}
当前栏目url: {$CATEGORYS[$catid][url]}
当前栏目位置(面包屑导航): 首页 > {catpos($catid)} 正文
当前栏目描述: {$CATEGORYS[$catid][description]}
当前栏目图片: <img src="{$CATEGORYS[$catid][image]}" />
当前栏目的内容数: {$CATEGORYS[$catid][items]}
当前栏目的点击数: {$CATEGORYS[$catid][hits]}
当前栏目的上级栏目id: {$CATEGORYS[$catid][parentid]}
可以放在内容页的任何位置
{pc:get sql="select * from v9_category where parentid = 19 order by listorder asc limit 0,6 --"}
{loop $data $v}
{$v[url]}
{/loop}
{/pc}
2.标签phpcms v9
{template ―content‖,‖header‖} ———- 调用根目录下phpcms\template\content\header文件
{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if} {$SEO['site_title']} {$SEO['keyword']} {$SEO['description']} ———————————–标题和标题seo优化
pc标签{pc:content 参数名=“参数值” 参数名=“参数值“ 参数名=”参数值“}
{pc:content action=”position“ posid=”9″ order=“id” num=“10″ cache=”3600″}
{loop $data $k $v}
<li><a href=‖{$v[url]}‖>{$v[title]}</a></li>
{/loop}
{/pc}
pc标签值:
action="position"————-对话框的类型=―内容推荐位列表‖
posid="9″——————–推荐位ID=―9‖
order=‖id‖——————–排序类型=―id‖
num=‖10″ ——————-数据调用数量=―10‖
cache=‖3600″—————-缓存=‖3600″毫秒
{get_siteid()}—————-
action="hits" 排行,热点等
action="lists" 主要用于列表等。
catid="$catid" 当前栏目ID 指定数字,即为指定的栏目 num="" 调用文章的数量
order="id DESC" 按ID降序排列
order="id ASC" 按ID升序排列
order="views DESC"
sort=""
thumb="1″ 缩略图 return=""
page="$page" 需要分页
每当列表几行的时候出现一次这个 {if $num%2==0} {/if}
循环标签 ——{loop $data $r} {/loop} ——{loop $info $r} {/loop}
日期——{date(‗Y-m-d H:i:s‘,$r[inputtime])}
文章链接——{$r[url]}
文章标题——{$r[title]}
标题截取——{str_cut($r[title],40,‘…‘)}
缩略图——{thumb($r[thumb],110,0)}
分页标签——{$pages}
文章页标签
标题——{$title}
内容——{$content}
日期——{$inputtime}
来源——{$copyfrom}
点击数——<span id="hits"></span>
<script src=‖{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}‖></script>
网站首页——{siteurl($siteid)}
当前位置——{catpos($catid)}
栏目名称——{$CAT[catname]}
栏目拼音——{$CAT[letter]}
栏目链接——{$CAT[url]}
父栏目名称——{$CATEGORYS[$CAT[parentid]][catname]}
父栏目链接——{$CATEGORYS[$CAT[parentid]][url]}
上上级栏目名称——{$CATEGORYS[$CATEGORYS[$CAT[parentid]][parentid]][catname]}
上上级栏目链接——{$CATEGORYS[$CATEGORYS[$CAT[parentid]][parentid]][url]}
一级父栏目列表
{pc:content action=‖category‖ catid="0″ num="34″ siteid="$siteid" order="listorder ASC"}
{loop $data $r}
<li><a href=‖{$r[url]}‖>{$r[catname]}</a></li>
{/loop}
{/pc}
同级栏目列表
{pc:content action="category" catid="$parentid" num="12″ siteid="$siteid" order="listorder ASC"}
{loop $data $r}
<li><a href=‖{$r[url]}‖>{$r[catname]}</a></li>
{/loop}
{/pc}
组图列表
{loop $photos $r}
<li><a href=‖{$r[url]}‖><img src=‖{thumb($r[url], 75, 45, 0)}‖ alt=‖{$r[alt]}‖ /></a></li>
{/loop}
注释:其中$photos为自定义组图字段,{$r[url]}为图片地址,{thumb($r[url], 75, 45, 0)}为图片缩略图,{$r[alt]}为图片描述
下面做总结,方便大家找到在内容页想调用的东西
当前栏目id: {$catid}
当前栏目名: {$CATEGORYS[$catid][catname]}
当前栏目目录名: {$CATEGORYS[$catid][catdir]}
当前栏目url: {$CATEGORYS[$catid][url]}
当前栏目位置(面包屑导航): 首页 > {catpos($catid)} 正文
当前栏目描述: {$CATEGORYS[$catid][description]}
当前栏目图片: <img src="{$CATEGORYS[$catid][image]}" />
当前栏目的内容数: {$CATEGORYS[$catid][items]}
当前栏目的点击数: {$CATEGORYS[$catid][hits]}
当前栏目的上级栏目id: {$CATEGORYS[$catid][parentid]}
可以放在内容页的任何位置
{pc:get sql="select * from v9_category where parentid = 19 order by listorder asc limit 0,6 --"}
{loop $data $v}
{$v[url]}
{/loop}
{/pc}
2.标签phpcms v9
{template ―content‖,‖header‖} ———- 调用根目录下phpcms\template\content\header文件
{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if} {$SEO['site_title']} {$SEO['keyword']} {$SEO['description']} ———————————–标题和标题seo优化
pc标签{pc:content 参数名=“参数值” 参数名=“参数值“ 参数名=”参数值“}
{pc:content action=”position“ posid=”9″ order=“id” num=“10″ cache=”3600″}
{loop $data $k $v}
<li><a href=‖{$v[url]}‖>{$v[title]}</a></li>
{/loop}
{/pc}
pc标签值:
action="position"————-对话框的类型=―内容推荐位列表‖
posid="9″——————–推荐位ID=―9‖
order=‖id‖——————–排序类型=―id‖
num=‖10″ ——————-数据调用数量=―10‖
cache=‖3600″—————-缓存=‖3600″毫秒
{get_siteid()}—————-
action="hits" 排行,热点等
action="lists" 主要用于列表等。
catid="$catid" 当前栏目ID 指定数字,即为指定的栏目 num="" 调用文章的数量
order="id DESC" 按ID降序排列
order="id ASC" 按ID升序排列
order="views DESC"
sort=""
thumb="1″ 缩略图 return=""
page="$page" 需要分页
每当列表几行的时候出现一次这个 {if $num%2==0} {/if}
循环标签 ——{loop $data $r} {/loop} ——{loop $info $r} {/loop}
日期——{date(‗Y-m-d H:i:s‘,$r[inputtime])}
文章链接——{$r[url]}
文章标题——{$r[title]}
标题截取——{str_cut($r[title],40,‘…‘)}
缩略图——{thumb($r[thumb],110,0)}
分页标签——{$pages}
文章页标签
标题——{$title}
内容——{$content}
日期——{$inputtime}
来源——{$copyfrom}
点击数——<span id="hits"></span>
<script src=‖{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}‖></script>
网站首页——{siteurl($siteid)}
当前位置——{catpos($catid)}
栏目名称——{$CAT[catname]}
栏目拼音——{$CAT[letter]}
栏目链接——{$CAT[url]}
父栏目名称——{$CATEGORYS[$CAT[parentid]][catname]}
父栏目链接——{$CATEGORYS[$CAT[parentid]][url]}
上上级栏目名称——{$CATEGORYS[$CATEGORYS[$CAT[parentid]][parentid]][catname]}
上上级栏目链接——{$CATEGORYS[$CATEGORYS[$CAT[parentid]][parentid]][url]}
一级父栏目列表
{pc:content action=‖category‖ catid="0″ num="34″ siteid="$siteid" order="listorder ASC"}
{loop $data $r}
<li><a href=‖{$r[url]}‖>{$r[catname]}</a></li>
{/loop}
{/pc}
同级栏目列表
{pc:content action="category" catid="$parentid" num="12″ siteid="$siteid" order="listorder ASC"}
{loop $data $r}
<li><a href=‖{$r[url]}‖>{$r[catname]}</a></li>
{/loop}
{/pc}
组图列表
{loop $photos $r}
<li><a href=‖{$r[url]}‖><img src=‖{thumb($r[url], 75, 45, 0)}‖ alt=‖{$r[alt]}‖ /></a></li>
{/loop}
注释:其中$photos为自定义组图字段,{$r[url]}为图片地址,{thumb($r[url], 75, 45, 0)}为图片缩略图,{$r[alt]}为图片描述
相关文章推荐
- phpcms标签整理_当前栏目调用
- phpcms模板标签整理
- phpcms 模板页面使用的标签和功能记录整理
- 【phpcms-v9】对{pc}标签进行二次开发,让其可以获取limit指定的文章条数
- 巧用过滤器和标签整理你的gmail邮件
- html的自闭合标签整理。
- Python通过正则表达式获取,去除(过滤)或者替换HTML标签的几种方法(本文由169it.com搜集整理)
- DEDECMS常用标签整理2012.11.22
- PHPCMS:V9内容模块PC标签调用说明
- phpcms标签规则
- PHP & Javascript 如何对字符串中包含html标签进行编码 整理
- Struts2标签大全,个人整理struts标签全、struts2标签全集学习
- meta标签整理的一些用法
- phpcms标签第三弹
- HTML meta标签常用属性整理
- PHPCMS收集标签使用
- phpcms自定义碎片插件之内容碎片标签模块使用方法
- phpcms 2008 使用get标签调用的文章按一天的点击排行
- Struts2的标签库整理
- HTML的meta标签常用属性整理