首页>织梦cms如何调用上级栏目名称和url

织梦cms如何调用上级栏目名称和url

作者:xiaosong  日期:06-30
dedecms调用上级栏目名称和链接的方法
动态调用:
{dede:type} [field:id runphp=yes] $tsql = new DedeSql(false); $typelink2 = ''; $tsql->SetQuery("Select i.typedir,i.id,i.typename From dede_arctype t left join dede_arctype i on i.id=t.reid where t.id='@me'"); $tsql->Execute('t'); while($row = $tsql->GetArray('t',MYSQL_ASSOC)) { $typelink2 .= "".$row['typename'].""; } @me=$typelink2; [/field:id]{/dede:type} 静态调用:
{dede:type} [field:id runphp=yes] $tsql = new DedeSql(false); $typelink2 = ''; $tsql->SetQuery("Select i.typedir,i.id,i.typename From dede_arctype t left join dede_arctype i on i.id=t.reid where t.id='@me'"); $tsql->Execute('t'); while($row = $tsql->GetArray('t',MYSQL_ASSOC)) { $typelink2 .= "".$row['typename'].""; } @me=str_replace("{cmspath}","",$typelink2); [/field:id] {/dede:type}
web前端|正则|JSP教程|ASP教程|
ajax教程|jquery教程|css教程|服务器|
操作系统|linux系统|SEO优化|网站运维|
织梦cms|javascript教程|html教程|编程开发|
php开发|数据库|Mysql教程|CMS建站教程|
phpcms教程|wordpress|apache服务器|
代码学堂-导航