phpcms 标签


{template "content","header"} 
<span style="font-family: 宋体; font-size: 14px; line-height: 22px;">调用根目录下phpcms\template\content\header文件</span>
<span style="font-family: 宋体; font-size: 14px; line-height: 22px;"></span><pre name="code" class="html">{pc:content  action="position" posid="9" order="id" num="10" cache="3600"}
<pre class="sh_html sh_sourceCode" name="code" style="margin: 8px; padding: 3px; font-size: 14px; width: 600px; border-width: 1px 1px 1px 5px; border-style: dashed dashed dashed solid; border-color: rgb(187, 187, 187); font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; white-space: pre-wrap; word-wrap: break-word; line-height: 22px; background-color: rgb(255, 255, 255);">{loop $data $k $v}
      <span class="sh_keyword" style="color: rgb(165, 42, 42);"><li><a</span> <span class="sh_type" style="color: rgb(0, 0, 255);">href</span><span class="sh_symbol">=</span><span class="sh_string" style="color: rgb(255, 0, 255);">"{$v[url]}"</span><span class="sh_keyword" style="color: rgb(165, 42, 42);">></span>{$v[title]}<span class="sh_keyword" style="color: rgb(165, 42, 42);"></a></li></span>
{/loop}
 {/opc} 
action="position"--------------对话框的类型=“内容推荐位列表”
posid="9"----------------------推荐位ID="9"
order="id"---------------------排序类型="id"
num="10" ----------------------数据调用数量="10"
cache="3600"-------------------缓存="3600"毫秒

{get_siteid()}
{IMG_PATH}
action="hits" 排行,热点等
action="lists" 主要用于列表等。
catid="$catid" 当前栏目ID   指定数字,即为指定的栏目
num=""  调用文章的数量
order="id DESC" 按ID降序排列
order="id ASC"  按ID升序排列
"views DESC" 
sort=""
"1" 缩略图
return=""
page="$page" 需要分页

 
</pre><pre name="code" class="html"><pre name="code" class="html">日期-------------{date('Y-m-d H:i:s',$r[inputtime])}
文章链接------{$r[url]}
文章标题------{$r[title]}
标题截取------{str_cut($r[title],40,'...')}
缩略图---------loop是info的时候用  {thumb($r[thumb],110,0)}     loop是data的时候用{thumb($v[thumb],90,0)}
分页标签------{$pages}


 
<span style="font-family: 宋体; font-size: 14px; line-height: 22px;">
</span>
内容页标签
标题-------{$title}
内容-------{$content}
日期-------{$inputtime}
来源-------{$copyfrom}
点击数------<span id="hits"></span>  

网站首页----------------{siteurl($siteid)}
当前位置----------------{catpos($catid)}
栏目名称----------------{$CAT[catname]} 
栏目拼音----------------{$CAT[letter]}
栏目链接----------------{$CAT[url]}------------------------{$CATEGORYS[241][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}


{thumb($v[thumb],90,60)} 在 loop  里面 调用  图片  大小 width:90; heihgt:60px;  // 第二个调用 的是   描述  80个汉字<pre name="code" class="html"><p><img src="{thumb($v[thumb],90,60)}" width="90" height="60" />{str_cut(strip_tags($v[description]), 160)}</p>

 
调用 指定栏目 url  
{$CATEGORYS[$r[9]][url]} $r  循环
<pre name="code" class="html">{$CATEGORYS[9][url]}     正确
 




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值