|
我们做织梦模版的时候,在调用二级菜单的时候,会遇到这样的问题,如果有子栏目,就显示二级菜单,如果没有就不显示,下面给出代码:
{dede:channelartlist row=8 typeid='1,2,3,4,5'}
[url=,{dede:field.typename/}[/url]
{dede:field name=typeid runphp="yes"}
global $dsql; $sql = "SELECT id From `arctype` WHERE reid='@me' And ishidden1 order by sortrank asc limit 0] 100 ";
$row = $dsql->GetOne($sql);
@me=is_array($row)?'':'';
{/dede:field}
{dede:channel type='son' noself='yes' }
[url=,[field:typename/,[/url]
{/dede:channel}
{dede:field name=typeid runphp="yes"}
global $dsql; $sql = "SELECT id From `arctype` WHERE reid='@me' And ishidden1 order by sortrank asc limit 0] 100 ";
$row = $dsql->GetOne($sql);
@me=is_array($row)?'':'';
{/dede:field}
{/dede:channelartlist} |
|