修改方法:
1、打开“站点根目录\include\taglib\type.lib.php"文件。
2、修改代码:红色部分为新添加的代码。从代码文件第31行开始。
$attlist='typeid|0,parent|0';
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = trim($ctag->GetInnerText());
if($typeid==0) {
$typeid = ( isset($refObj->TypeLink->TypeInfos['id']) ? $refObj->TypeLink->TypeInfos['id'] : $envs['typeid'] );
}
if(empty($typeid)) return '';
$row = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid' ");
if ($parent==1) $row = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='{$row['reid']}' ");
3、调用方法:
{dede:type typeid='3' parent='1'}[field:typename/]{/dede:type}