以前在用到织梦模板无限级栏目列表菜单时下载了网上的资料都未成功,因此我参考网上及dedecms本身的channel.lib.php及cattree.lib.php制作了调用标签。 1、在includetaglib建立randomartlist.lib.php 内容如下: CAttribute->Items,$attlist); extract($ctag->CAttribute->Items, EXTR_SKIP); $revalue = ''; //读取固定的缓存块 $cacheid = trim($cacheid); if($cacheid !='') { $revalue = GetCacheBlock($cacheid); if($revalue != '') return $revalue; } //如果属性里没指定栏目id,从引用类里获取栏目信息 if(empty($typeid)) { if( isset($refObj->TypeLink->TypeInfos['id',) ) { $typeid = $refObj->TypeLink->TypeInfos['id',; $reid = $refObj->TypeLink->TypeInfos['reid',; $topid = $refObj->TypeLink->TypeInfos['topid',; } else { $typeid = 0; } } else { $row2 = $dsql->GetOne("SELECT reid,topid,channeltype,ispart FROM `dede_arctype` WHERE reid='$topid' "); if(!is_array($row2)) { $typeid = $reid = $topid = $channeltype = $ispart = 0; } else { $reid = $row2['reid',; $channeltype = $row2['channeltype',; $ispart = $row2['ispart',; $t...
内容已隐藏,请关注公众号输入验证码查看
本帖支持关注公众号查看
【无套路 无套路 无套路 扫描二维码关注公众号发送【验证码】收到验证码 在上面输入点击提交查看即可显示隐藏内容】
|