| 调用标签 | 调用名称 | 备注说明 |
|---|---|---|
| {$name} | 栏目名称 | |
| {$parent.name} | 父栏目名称 | |
当前位置:
当前位置:<a href="{SITE_URL}">首页</a>{if !IS_SHARE} > <a href="{MODULE_URL}">{MODULE_NAME}</a>{/if}{dr_catpos($catid, '', true, ' > <a href="[url]">[name]</a>')}循环同级栏目
调用栏目下级或者同级栏目,当栏目存在下级栏目时就调用下级栏目,如果不存在下级栏目就调用当前栏目的同级栏目
同时适用于 search.html list.html category.html show.html page.html模板
{loop $related $c}
<li {if $c.id==$cat.id} class="active"{/if}><a href="{$c.url}">{$c.name}</a></li>
{/loop}判断当前栏目是否含有子栏目
{if $cat.child}
有
{else}
没有
{/if}如果有子栏目则显示子栏目,如果没有,则显示父栏目下子栏目,如果也没有,就显示当前栏目
{if $cat.child}
{loop $related $c}
<dd><a href="{$c.url}" class="{if in_array($catid, $c.catids)}active{/if}">{$c.name}</a></dd>
{/loop}
{else if $parent.child}
{loop $related $c}
<dd><a href="{$c.url}" class="{if in_array($catid, $c.catids)}active{/if}">{$c.name}</a></dd>
{/loop}
{else}
<dd><a href="{$cat.url}" class="active">{$cat.name}</a></dd>
{/if}


