如果通过“内容模型管理 >自定义搜索”搜索的结果页如果要显示自定义字段,可使用以下方法:
1。修改puls/advancedsearch.php文件,找到
$query = "select arctype.* FROM $addontabl| $ d * _ Fe addon left join dede2_arctype arctype on arc` # a | | # mtype.id=addo , ? ` y 7 . [on.typeid $where $orderby"; } else { $query = "selectQ E { k main.id as aid,main.*,main.description as descrip| + : \ i Dtion1, type.* from $maintaS q G ] m pble main l{ ! z ( v G T $ ~eft join dede2_arctype type on type.id=main.typeid left join $addontable addon on adN - k Sdon.aid=main.id $where $orderby";
2.在selecv ^ 0 ,t后面增加"addon.*,"
修改后应该是
$query = "selew b L @ Wct addon.*, arctype.* from $addontable addon left join dede2_arctype arctype onq N I V g n arctype.id=add? $ g n .on.typeid $where $orderby"; } else { $quer+ e l x / xy = "select addon.*,main.id as aid,main.*,main.description as description1, type.* from $mainA W H Ntable main left join dede2_arctype type on type.id=4 ~ y P I (main.typeid left join $addoj m k I z a Intable addon on addo+ + m J / H \ u in.aid=main.id $where $order2 w 4 #by";
注意,有两个地方要加,上述标红的地方。测试成功。实站仿站绝对成功
显示结果要修改模板文件,D F v在plus/advancedsearch.htm,{dede:datalist}中直接调用{5 $ R . #dede:field.字段名称/}就OK了