聯系官方銷售客服
1835022288
028-61286886
自定義搜索模版不跳轉對應自定義模版,還是默認search.html模版,搜索結果不是指定欄目下的數據
<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、開啟開發者模式,做模板階段必開
2、在模板里面增加代碼
后面加一句{$debug_rs}
3、訪問這個搜索頁面
4、復制給我搜索的url
5、復制給我看debug信息結果
回復迅睿框架創始人
我上面寫法是否正確?
這個地址不對,需要加上你圖片一里面的欄目編號
回復迅睿框架創始人 大佬,這個欄目號怎么添加上去
回復迅睿框架創始人
測試了下,手動在網址上加個&catid=107屬于正常的,既可以調用自定義搜索模版,又可以調用指定欄目107下的數據
那么粘貼到哪個位置&catid=107,可以搜索時自動出現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">
加個參數,傳遞下id