|
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 .= "[url=list.php?tid=".$row[,".$row['typename',."[/url]";
}
@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 .= "[url=".$row[,".$row['typename',."[/url]";
}
@me=str_replace("{cmspath}","",$typelink2);
[/field:id,
{/dede:type} |
|