請問一下,搜索功能,能否指定搜索結(jié)果頁? 比如這個專門搜索圖片模塊內(nèi)容的,搜索結(jié)果頁能單獨定義一個結(jié)果頁。
<form class="search" action="/index.php" method="get">
<input type="text" name="keyword" placeholder="請輸入關(guān)鍵詞...">
<input type="hidden" name="s" value="photo">
<input type="hidden" name="c" value="search">
<button class="search-btn" type="submit">搜索</button>
</form>
搜索結(jié)果頁是獨立的,photo/search.html
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人 感謝回復(fù),我文章模塊和圖片模塊都是顯示的同一個搜索頁,不知道怎么設(shè)置
/index.php?keyword=&s=photo&c=search
或者說 如何設(shè)置下面代碼,使它可以指定結(jié)果頁?
<form class="search" action="/index.php" method="get"> <input type="text" name="keyword" placeholder="請輸入關(guān)鍵詞..."> <input type="hidden" name="s" value="photo"> <input type="hidden" name="c" value="search"> <button class="search-btn" type="submit">搜索</button> </form>你圖片里面顯示的是 template/pc/h1/search.html,那是因為photo目錄里面沒有searc.html文件,這時候系統(tǒng)就會加載他上級的searchhtml文件了,你只需要
新建 template/pc/h1/photo/search.html
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!