自定義搜索模版不跳轉(zhuǎn)對應(yīng)自定義模版,還是默認(rèn)search.html模版,搜索結(jié)果不是指定欄目下的數(shù)據(jù)
<form action="/index.php?s=fxinghao&c=search&catid=76" method="get">
<input name="xinghao" id="SearchStr1" type="text" placeholder="請輸入型號">
<input name="pinpai" id="SearchStr2" type="text" placeholder="請輸入品牌">
<input type="hidden" name="s" value="fxinghao">
<input type="hidden" name="c" value="search">
<input type="submit" value="查詢">
</form>
{search module=MOD_DIR id=$searchid total=$sototal order=$params.order catid=107 pagesize=100 urlrule=$urlrule page=1 return=rs}
<tr style="height:14.25pt;" class="ue-table-interlace-color-double">
<td class="et2 selectTdClass" style="border-width: 1px; border-style: solid; border-color: rgb(221, 221, 221);" width="303" align="center" valign="middle">
<a href="{$rs.url}"> {$rs.xinghao}</a>
</td>
<td class="et2 selectTdClass" style="word-break: break-all; border-width: 1px; border-style: solid; border-color: rgb(221, 221, 221);" width="194" align="center" valign="middle">
<span class="font0"><a href="{$rs.url}"><a href="{$rs.url}">{$rs.pinpai}</a></span>
</td>
</tr>{/search}
1、開啟開發(fā)者模式,做模板階段必開
2、在模板里面增加代碼
</tr>{/search}后面加一句{$debug_rs}
3、訪問這個搜索頁面
4、復(fù)制給我搜索的url
5、復(fù)制給我看debug信息結(jié)果
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
我上面寫法是否正確?
這個地址不對,需要加上你圖片一里面的欄目編號
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅睿框架創(chuàng)始人 大佬,這個欄目號怎么添加上去
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
測試了下,手動在網(wǎng)址上加個&catid=107屬于正常的,既可以調(diào)用自定義搜索模版,又可以調(diào)用指定欄目107下的數(shù)據(jù)
那么粘貼到哪個位置&catid=107,可以搜索時自動出現(xiàn)https://www.xxxxxx.com/index.php?xinghao=&pinpai=&leixing=&neijing=1&waijing=&houdu=&s=fxinghao&c=search&catid=107
<input type="hidden" name="catid" value="107">
加個參數(shù),傳遞下id