<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦dedecms获取当前栏目的上级栏目名称及链接的方法

时间:2020-12-15

有时候在用织梦建网站的时候会需要在子栏目显示上级栏目的名称和链接。下面附上一段模版代码。

复制到模版中就可以使用。已经测试过支持最新版本的织梦。

<a href=
   {dede:field.typeid runphp='yes'"}
   global $dsql ;
   $reid = $dsql->GetOne("SELECT reid FROM dede_arctype where id=@me");
   $reid = $reid['reid'];
   $typename = $dsql->GetOne("SELECT typedir FROM dede_arctype where id=$reid");
   @me=str_replace('{cmspath}','',$typename['typedir']);
{/dede:field.typeid}
   >
{dede:field.typeid runphp='yes'"}
   global $dsql ;
   $reid = $dsql->GetOne("SELECT reid FROM dede_arctype where id=@me");
   $reid = $reid['reid'];
   $typename = $dsql->GetOne("SELECT typename FROM dede_arctype where id=$reid");
   @me=$typename['typename'];
{/dede:field.typeid}

</a>

0
首页
案例
关于
联系