您现在的位置是:首页 > 网站建设网站建设

织梦:channel标签如何获取上一级的栏目列表啊

江湖快报网2022-12-16 05:50:53【网站建设】人已围观

简介假如你必定要用那个标签,你可以本身扩大个属性调动上级栏目,假如不必定要用那个标签,可以直接查数据库不就好了。
织梦如何获取任何一篇文章所属的顶级栏目的id
通过sql语句可

假如你必定要用那个标签,你可以本身扩大个属性调动上级栏目,假如不必定要用那个标签,可以直接查数据库不就好了。

织梦如何获取任何一篇文章所属的顶级栏目的id

通过sql语句可以不过在不同页面,又不一样 麻烦了点

dede织梦获取顶级栏目名称出错,请教高手

找到 include/taglib/type.lib.php , 复制, 重命名为 toptype.lib.php
查找 function lib_type(&$ctag,&$refObj)
修改为:
function lib_toptype(&$ctag,&$refObj)
查找 $row = $dsql->GetOne
注释掉 //$row = $dsql->GetOne(Select id,topid,description,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,typelitpic From `#@__arctype` where id='$typeid' );
添加3行:
$topid=$dsql->GetOne(Select topid From `#@__arctype` where id='$typeid' );
$topid=$topid['topid'];
$row=$dsql->GetOne(Select id,topid,description,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,typelitpic From `#@__arctype` where id='$topid' );
模板调用: {dede:toptype}[field:typename/]{/dede:toptype}

Tags:出错   请教   顶级

很赞哦! ()

文章评论

    共有条评论来说两句吧...

    用户名:

    验证码:

本站推荐