phpcms调取当前栏目的描述及当前栏目的名称
{$CATEGORYS[$catid][description]}
{catpos($catid)} 显示文章位置导航
{$CATEGORYS[$catid][url]} 显示当前栏目链接
{$CATEGORYS[$catid][catname]} 显示当前栏目名称
phpcms栏目页调用父级栏目id/名称等任意字段的佳办法:
顶级父栏目名称:{$CATEGORYS[$top_parentid][catname]}
顶级父栏目url:{$CATEGORYS[$top_parentid][url]}
顶级父栏目id:{$CATEGORYS[$top_parentid][catid]}
其他字段:只需要改动XXX:{$CATEGORYS[$top_parentid][XXX]}
假如我们要在一个列表页调用当前栏目顶级栏目的子栏目
{pc:content action="category" catid="$CATEGORYS[$top_parentid][catid]" num="20" return="data2" siteid="$siteid" order="listorder ASC"}
<ul>
<li id=”page-item-{$v[catid]}”><a href=”{$v[url]}”>{$v[catname]}</a></li>
</ul>
{loop $data2 $v}
{/loop}
{/pc}
上一篇: 网站遇到了流量攻击怎么办
下一篇: 某金融行业360平台加粉数据
游客回答:(0)