程序员一代码搬运工
【Java学习心得和Java学习技术个人总结】

dedecms获取当前栏目的上级栏目名称及链接

<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)
未经允许不得转载:程序员一代码搬运工 » dedecms获取当前栏目的上级栏目名称及链接
分享到: 更多 (0)