<ul>
{eycms:rs top="10" table="ey_content" where="islock=1 and classid in([eycms.get_sonid(rootid)]) and id<>[id]" order="ontop desc,ordnum desc,id desc"}
{rs:eof}暂无资料{/rs:eof}
<li><span>[{eycms.formatDate($rs[createdate],7)}]</span><a href="{$rs[link]}" title="{$rs[title]}">{$rs[title]}</a></li>
{/eycms:rs}
</ul>
|
代码说明:
先获取内容所在大栏目ID的所有子类,然后给where参数使用,并排除当前内容ID。