dedecms自定义字段在自定义高级搜索advancedsearch.htm中不能搜索
在一般的页面中用下面addfields='actor,varea,vyear' channelid='7'就可以了 但是在advancedsearch.htm很多标签的使用 需要设置很多
就是说下面的主演,地区,年份 在advancedsearch.htm 搜索中显示不出来
不是很懂 希望知道的朋友 知道哈 先谢之!
{dede:datalist pagesize='16' col=2 titlelen=18 addfields='actor,varea,vyear' channelid='7'}<?php
$fields['stime'] = GetDateTimeMk($fields['senddate']);
$fields['arcurl'] = GetArcUrl($fields['aid'],$fields['typeid'],$fields['senddate'],$fields['title'],$fields['ismake'],$fields['arcrank'],$fields['namerule'],$fields['typedir'],$fields['money']);
$fields['typeurl'] = GetTypeUrl($fields['typeid'],MfTypedir($fields['typedir']),$fields['isdefault'],$fields['defaultname'],
$fields['ispart'],$fields['namerule2'],$fields['moresite'],$fields['siteurl'],$fields['sitepath']);
?>
<li><a href="{dede:field.arcurl/}" target="_blank"><imgclass="imgc" src="{dede:field.litpic/}"height=164 width=134 border=0 alt="{dede:field.title/}"/></a>
<p><a href="{dede:field.arcurl/}" target="_blank"><b>{dede:field.title/}</b></a></p>
<p>主演:{dede:field.actor/}</p>
<p>类型:{dede:field.typename/}</p>
<p>时间:{dede:field.stime/}</p>
<p>地区:{dede:field.varea/}</p>
<p>年份:{dede:field.vyear/}</p>
<p><A href="{dede:field.arcurl/}" target="_blank"><IMG
src="../templets/qwys/img/content.jpg"></A> <A
href="../plus/play.php?aid=&play=1"target="_blank"><IMG
src="../templets/qwys/img/play.jpg"></A></p>
</li>
{/dede:datalist}
解决方法:
advancedsearch.php
$query = "select main.id as aid,main.*,main.description as description1, type.*
from $maintable main
left join #@__arctype type on type.id=main.typeid
left join $addontable addon on addon.aid=main.id
$where$orderby";
改
$query = "select main.id as aid,main.*,main.description as description1, type.* ,addon.*
from $maintable main
left join #@__arctype type on type.id=main.typeid
left join $addontable addon on addon.aid=main.id
$where$orderby";
考虑性能,如果没必要就不要搜索这些字段了
页:
[1]