多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 常用调用数据 ~~~ {pc:content action="lists" catid="6" num="8" order="inputtime DESC" } {loop $data $r} <li> <span class="date">({date('Y/m/d H:m:s',$r[inputtime])})</span> <a href="{$r[url]}" target="_blank" title="{$r[title]}"> {str_cut($r[title],'28')} </a> </li> {/loop} {/pc} ~~~ ## 简介、图片 `{str_cut(strip_tags($r[description]), 165)}` `{thumb($r[thumb],320,214)}` ## 推荐位调用 ~~~ {pc:content action="position" posid="1" order="listorder DESC" num="5"} {loop $data $r} <li> <a href="{$r[url]}" target="_blank"> <img src="{$r[thumb]}" text="{$r[title]}" alt="{$r[title]}" width="727" height='243' /> </a> </li> {/loop} {/pc} ~~~ ## 指定变量循环增长: ~~~ {pc:content... {php $num = 0} {loop $data $r} ... {php $num++} {/loop} {/pc} ~~~ ## 文章列表页调用关键字,或者首页调用关键字: ~~~ {pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"} {loop $data $r} <a href="{$r[url]}">{$r[title]}</a> php $keywords = explode(',',$r[keywords]);} <b>文章标签:</b> {loop $keywords $keyword} <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&tag={urlencode($keyword)}" class="blue"> {$keyword}</a> {/loop} {/loop} {/pc} ~~~