目录
- 需求
- {dede:field name=typeid runphp=yes}global $dsql;$row = $dsql->GetOne("select * from `dede_arctype` where reid='@me' and ishidden1 order by sortrank asc limit 0,1");if(is_array($row)) @me = 'javascript:;'; else @me = GetOneTypeUrlA($dsql->GetOne("select * from `dede_arctype` where id='@me' and ishidden1"));{/dede:field}
- 织梦二次开发示范
需求
有二级栏目时一级栏目的Url输出javascript:;只有一级栏目就输出链接
{dede:field name=typeid runphp=yes}global $dsql;$row = $dsql->GetOne("select * from `dede_arctype` where reid='@me' and ishidden<>1 order by sortrank asc limit 0,1");if(is_array($row)) @me = 'javascript:;'; else @me = GetOneTypeUrlA($dsql->GetOne("select * from `dede_arctype` where id='@me' and ishidden<>1"));{/dede:field}
织梦二次开发示范
{dede:channelartlist row=7 typeid=top currentstyle=current} <li> <a href="{dede:field name=typeid runphp=yes}global $dsql;$row = $dsql->GetOne("select * from `dede_arctype` where reid='@me' and ishidden<>1 order by sortrank asc limit 0,1");if(is_array($row)) @me = 'javascript:;'; else @me = GetOneTypeUrlA($dsql->GetOne("select * from `dede_arctype` where id='@me' and ishidden<>1"));{/dede:field}"><span>{dede:field.typename/}</span>{dede:channel type='son' row=1 noself='yes'}<i class="touch-arrow-down"></i>{/dede:channel}</a> {dede:channel type='son' row=1 noself='yes'} <ul> {/dede:channel} {dede:channel type='son' noself='yes'} <li><a href="[field:typelink/]"><span>[field:typename/]</span></a></li> {/dede:channel} {dede:channel type='son' row=1 noself='yes'} </ul> {/dede:channel} </li> {/dede:channelartlist}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。