需求有二级栏目时一级栏目的Url输出javascript:;只有一级栏目就输出链接解答判断是否有子栏目,有就输出javascript:;,没有子栏目就直接输出一级栏目的链接{dede:field name=typeid runphp=yes}global $dsql;$row = $dsql->GetOne("select * from `58pic_arctype` where reid=@me and ishidden<>1 order by sortrank asc limit 0,1")...
DedeCMS织梦channelartlist 有下级栏目时输出对应的HTML标签,反之不输出,在 include 文件夹下的 extend.func.php 添加:function display_ul($i,$var=0){ global $dsql; $row = $dsql->GetOne("SELECT COUNT(id) as num FROM 58pic_arctype WHERE reid = $i)"); if($row[num]>0 ){ i...
调动栏目的地址,静态时为静态访问地址,动态浏览时为动态访问地址。$sql="SELECT * FROM dede_arctype where topid=0 and ishidden = 0 order by sortrank asc,id asc";$dsql->SetQuery($sql);$dsql->Execute();$topids= array();while($arr = $dsql->GetArray()){ $typeurl = GetOneTypeUrlA($arr); ...