好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

让织梦自定义搜索页显示自定义字段 - DeDecms

让织梦自定义搜索页显示自定义字段

已经解决了...修改advancedsearch.php文件找到代码:

$query  = "select arctype.* from  $addontable  addon  left join detest_arctype arctype on arctype.id=addon.typeid  $where   $orderby ";  }  else  {  $query  = "select main.id  as  aid,main.*,main.description  as  description1, type.*  from  $maintable  main  left join detest_arctype type on type.id=main.typeid  left join  $addontable  addon on addon.aid=main.id  $where   $orderby "; 

在select后面增加"addon.*,",修改后应该是代码:

$query  = "select addon.*, arctype.* from  $addontable  addon  left join detest_arctype arctype on arctype.id=addon.typeid  $where   $orderby ";  }  else  {  $query  = "select addon.*,main.id  as  aid,main.*,main.description  as  description1, type.* //开源软件:phpfensi.com   from  $maintable  main  left join detest_arctype type on type.id=main.typeid  left join  $addontable  addon on addon.aid=main.id  $where   $orderby "; 

注意,有两个地方要加.

显示结果要修改模板文件,在plus/advancedsearch.htm,{dede:datalist}中直接调用{dede:field.字段名称/}就OK了.

查看更多关于让织梦自定义搜索页显示自定义字段 - DeDecms的详细内容...

  阅读:56次