首页调用栏目

{pc:content action="category" siteid="$siteid" num="15" order="listorder"}
{loop $data $r}
<li><a title="" href="{$r}">{$r[catname]}</a></li>
{/loop}
{/pc}

调用二级栏目

{pc:content action="category" catid="7" num="20" order="listorder"}
{loop $data $r}
<a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[catname]}</a>
{/loop}
{/pc}

判断当前栏目是否存在子栏目

{if $v[child]==1}
XXX
{else}
XXX
{/if}

调用文章列表

{pc:content action="lists" catid="25" num="8" order="id desc"}
{loop $data $r}
<li><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></li>
{/loop}
{/pc}

带缩略图:

{pc:content action="lists" catid="20" order="id desc" num="6"}
{loop $data $r}
<div class="tuphp">
<h4><a href="{$r[url]}" target="_blank" title="{$r[title]}">
<img src="{thumb($r['thumb'],111,139)}" alt="{$r[title]}" width="" height="" border="0"></a></h4>
<p><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></p>
</div>
{/loop}
{/pc}

调用推荐位

{pc:content action="position" posid="2" order="listorder" num="1"}
{loop $data $r}
<div class="abti"><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></div>
<div class="aboutcon"> <img src="statics/dimages/2010111758232601.jpg">{str_cut($r[description],106)}
<div style="clear:both;"></div>
</div>
<div class="abobtn"><a href="{$r[url]}" target="_blank" title=""><img src="statics/dimages/abobtn.jpg"></a></div>
{/loop}
{/pc}

sql方法调用

{pc:get sql="SELECT * FROM v9_news WHERE catid <= 50 and catid >= 1  order by id DESC" return="data" num="6" start="0"  }
{loop $data $r}
<li><a href="{$r[url]}" target="_blank" class="lef" title="{$r[title]}">{str_cut($r[title],35,'')}</a><span>[{date('Y-m-d',$r[inputtime])}]</span></li>
{/loop}
{/pc}

调用相关文章

{pc:content action="relation" relation="$relation" catid="2" num="5" keywords="$rs[keywords]"}
{loop $data $r}
{$r[title]}
{/loop}
{/pc}

内容页相关文章的点击量

{pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}
{loop $data $r}
<p>
<li><a href="{$r[url]}" target="_blank"><img src="/NanJing454/statics/nimages/next1.png" /> {str_cut($r[title], 57)}</a>{php $h_md=pc_base::load_model('hits_model');$get_db=$h_md->get_one(array('hitsid'=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}
点击量:{$views} </li>
</p>
{/loop}
{/pc}

全站最新文章

{pc:content action="newcontent" order="8" num="7"}
{loop $data $r}
<li>[{$CATEGORYS[$r[catid]][catname]}]<a href="{$r['url']}">{str_cut($r['title'],28)}</a></li>
{/loop}
{/pc}

合作机构:

{pc:link action="type_list" linktype="1" siteid="$siteid" typeid="53" num="16" order="listorder DESC"}
{loop $data $r}
<img src="{$r['logo']}" border="0" />
{/loop}
{/pc}

友情链接:

{pc:link  action="type_list" siteid="$siteid"  typeid="53" order="listorder DESC" num="60" return="dat"}
{loop $dat $v}
<a href="{$v[url]}" target="_blank" title="{$v[name]}">{$v[name]}</a>
{/loop}
{/pc} {date('Y-m-d',$r[inputtime])}
{str_cut($r[title],30,'')}

列表页调父栏目子栏目

{php $arrchildid = $CATEGORYS[$CAT[parentid]][catid]}
{pc … catid="$arrchildid"}

内页时间:

{date('Y-m-d',strtotime($inputtime))}

phpcms v9模版调用代码大全(全面而实用)的更多相关文章

  1. phpcms v9 模板调用代码大全

    另:每个栏目会对应当前所选模型的三个模板文件:  这些模板文件所在位置:phpcms/templates/default/content/ 目录下,如果想修改模板文件,只需要到此目录下找到对应的模板文 ...

  2. phpcms v9模版调用代码

    首页调用栏目{pc:content action="category" siteid="$siteid" num="15" order=&q ...

  3. phpcms v9 get调用标签整理

    常见的phpcms标签调用  1.调用本系统单条数据(调用ID为1的信息,标题长度不超过25个汉字,显示更新日期): "select * from phpcms_content where  ...

  4. phpcms v9 常用调用标签(全)

    本文介绍phpcms v9中模板标签使用说明. {template ) {==}   {/,,)}     loop是data的时候用{thumb($v[thumb],,)} 分页标签------{$ ...

  5. phpcms v9 标签调用,函数,sql

    1.截取调用标题长度 {str_cut($r[title],36,'')} 2.格式化时间 调用格式化时间 2011-05-06 11:22:33 {date('Y-m-d H:i:s',$r[inp ...

  6. phpcms v9实现调用多个栏目id的方法

    {pc:content action="position" posid="14" catid="13,14,15,16,17,18,19,20,21& ...

  7. phpcms v9中调用栏目及调用多个子栏目中的文章列表

    调用一个指定栏目列表:            {pc:content action="lists" catid="6" order="id DESC& ...

  8. phpcms v9中调用多栏目的方法--get标签(备实例)

    如调用栏目id为1,2,7的栏目列表: {pc:get sql="select * from v9_category where catid IN (1,2,7)"} {loop ...

  9. phpcms v9 tags调用方法

    {loop $keywords $keyword} <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid ...

随机推荐

  1. awk命令

    awk 手册   原文 Table of Contents 1. awk简介 2. awk命令格式和选项 2.1. awk的语法有两种形式 2.2. 命令选项 3. 模式和操作 3.1. 模式 3.2 ...

  2. Selenium介绍

    基于selenium的自动化测试,华为已经做了两代了,目前是做到SmartGUI2.0,基于他们自己的AutoSpace平台.不过目前支持的貌似只有IE和火狐(火狐3.6).控件录制支持ID,Name ...

  3. node相关--测试

    测试: assert模块; //node自带 var assert = require('assert'); var now = Date.now(); console.log(now); asser ...

  4. 【python游戏编程之旅】第二篇--pygame中的IO、数据

    本系列博客介绍以python+pygame库进行小游戏的开发.有写的不对之处还望各位海涵. 在上一篇中,我们介绍了pygame的入门操作http://www.cnblogs.com/msxh/p/49 ...

  5. Big Event in HDU[HDU1171]

    Big Event in HDU Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  6. currentRowChanged 的注意事项

    Qt中的表单控件QListWidget类提供了许多信号函数,可以和用户交互,其中有个currentRowChanged ( int currentRow ) 是检测当前选中行是否发生了改变,如果改变了 ...

  7. Why Consumer Hardware Start-ups Fail

    今年看到一篇文章还是很受启发. If you have the guts to start selling what you believe in, customers who share your ...

  8. HDU 2094 产生冠军(半拓扑排序+map)

    产生冠军 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submi ...

  9. hlg 2130 状压dp

    基本的状压dp 需要注意的是两点之间直线最短 所以不需要进行floyd 由于把dp的memset放在了初始化0的后面de了好久的bug.. #include<stdio.h> #inclu ...

  10. Yii源码阅读笔记(八)

    前面阅读了Yii2的两个基本类Object和Component,了解了Yii的三个重要概念属性.事件.行为,下面开始阅读Event类,Event类是所有事件类的基类: <?php /** * @ ...