phpcms 调用
作者:互联网
头部
<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"} 底部
导航
<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>
当前页标题 {$CATEGORYS[$catid][catname]} 当前也链接 {$CATEGORYS[$catid][url]} 分页 {$pages} 时间 {$date('Y/m/d',$r['inputtime'])} 标题 {str_cut($val['title'],68,"…")} 详情 {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="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" order="listorder ASC" num="9" 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>
标签:调用,catid,pc,title,content,phpcms,catname,loop 来源: https://www.cnblogs.com/xaun/p/11460178.html