头部
头部
<meta name="keywords" content="{$SEO['keyword']}" /> <meta name="description" content="{$SEO['description']}" /> <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title> {template "content","header"} 头部 {template "content","footer"} 底部
当前页标题 {$CATEGORYS[$catid][catname]} 当前也链接 {$CATEGORYS[$catid][url]}
当前栏目描述 {$CATEGORYS[$catid][description]}
当前栏目图片 {$CATEGORYS[$catid]['image']}
碎片 {pc:block pos="index"}{/pc}
分页 {$pages}
{if $pages} {$pages} {/if}
时间 {$date('Y/m/d',$r['inputtime'])}
标题 {str_cut($r['title'],36)}
详情 {str_cut($r[description],500)}
面包屑导航 首页 > {catpos($catid)} 正文
<p>当前位置 : <a href="/">首页</a> > <a href="{$CATEGORYS[$CAT[parentid]][url]}">{$CATEGORYS[$CAT[parentid]][catname]}</a> > <a href="{$CAT[url]}">{$CAT[catname]}</a></p>
{pc:content action="lists" catid="11" num="6" order="id DESC LIMIT 5,6--" moreinfo="1" page="$page"}
第6条开始调,调6条
导航
<li class="{if !$catid}nav_ac{/if}"><a href="/">网站首页</a></li> <li class="{if $top_parentid == $v[catid]||$catid==$v[catid]||$parentid==$v[catid]}nav_ac{/if}"></li> <ul>
{pc:content action="category" catid="0" num="8" siteid="$siteid" order="listorder ASC"} <li class="{if !$catid}nav_ac{/if}"><a href="/">网站首页</a> </li> {loop $data $k $v} <li class="{if $top_parentid == $v[catid]||$catid==$v[catid]||$parentid==$v[catid]}nav_ac{/if}"><a href="{$v[url]}">{$v[catname]}</a> </li> {/loop} {/pc} </ul>
<ul> <li><a href="/" title="">首页</a></li> {pc:content action="category" catid="0" num="8" siteid="$siteid" order="listorder ASC"} {loop $data $k $v} <li><a href="{$v[url]}">{$v[catname]}</a> <div class="cell"> <ul> {pc:content action="category" catid="$k" num="8" siteid="$siteid" order="listorder ASC"} {loop $data $r} <li><a href="{$r[url]}">{$r[catname]}</a></li> {/loop} {/pc} </ul> </div> </li> {/loop} {/pc} </ul>
调标题
{pc:content action="category" catid="$top_parentid" num="5" order="listorder ASC"} {loop $data $cat} <p><a href="{$cat['url']}">{$cat['catname']}</a></p> {/loop} {/pc}
{if $cat[catid]==$catid} class="active"{/if}
调内容
<ul> {pc:content action="lists" catid="$catid" num="8" order="id DESC" moreinfo="1" page="$page"} {loop $data $r} <li><a href="{$r[url]}"> <div class="anli_img"> <img src="{thumb($r['thumb'],293,197)}" alt="{$r['title']}"> </div> <div class="anli_txt"> <h3>{$r['title']}</h3> </div> </a></li> {/loop} {/pc} </ul>
推荐位
{pc:content action="position" posid="2" order="id DESC" num="5"}
{loop $data $r}
<li><a href="{$r[url]}">
<div class="anli_img">
<img src="{thumb($r['thumb'],293,197)}" alt="{$r["title']}">
</div>
<div class="anli_txt">
<h3>{$r['title']}</h3>
</div>
</a></li>
{/loop}
{/pc}
调单页内容
{pc:get sql="SELECT * FROM phpcms_page where catid=16"}
{loop $data $val}
{$val[content]}
{/loop}
{/pc}
限制字数 {str_cut(strip_tags($val[content]),400,"")}...
调用点击量
需要在show.html 模板中首先加载jquery.min.j
<span>点击:<span id="hits"></span>次</span> <script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>
调用关键字
<div class="next">关键字: {loop $keywords $keyword} <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&a=lists&tag={urlencode($keyword)}" target="_blank"> {$keyword}</a>
{/loop} </div>