迅睿開(kāi)源框架是一款PHP8高性能·簡(jiǎn)單易用的PHP開(kāi)源開(kāi)發(fā)框架, 基于MIT開(kāi)源許可協(xié)議發(fā)布,不限制商業(yè)使用,以多端互聯(lián)為設(shè)計(jì)理念, 支持的微信公眾號(hào)、小程序、APP客戶(hù)端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
業(yè)務(wù)經(jīng)理
微信掃描以上二維碼
028-61286886
技術(shù)咨詢(xún)
自己個(gè)人愛(ài)好弄了一個(gè)項(xiàng)目。一個(gè)問(wèn)題搞了很久沒(méi)搞明白。
我就是想在頭部弄一個(gè)多模塊選擇。選擇自定模塊搜索的時(shí)候就對(duì)這個(gè)模塊就行搜索..一直沒(méi)搞明白怎么弄。
希望官方幫忙 謝謝了
大概就是這樣的 每個(gè)單選都是一個(gè)單獨(dú)模塊.
參考文檔:《內(nèi)容模塊搜索框?qū)懛ā?/a>
參考文檔:《循環(huán)模塊名稱(chēng)》
結(jié)合兩個(gè)文檔
開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
http://demo4.xunruicms.com/
默認(rèn)模板就有這個(gè)代碼呀,復(fù)制參考
回復(fù)@迅睿框架聯(lián)合創(chuàng)始人
剛接觸這個(gè)cms 不是很懂..
回復(fù)@展望未來(lái) 看了演示了 只有一段
<div class="page-header-search"> </div>
這個(gè)里面有官方寫(xiě)的
回復(fù)@王小五
下載的版本只有這個(gè)?。?/p>
那我就不清楚了,我是這個(gè)月下的,你再下載看看。
回復(fù)@王小五 剛剛我還下載了 就是這樣!難道免費(fèi)用戶(hù)都是這樣的?方便把代碼分享一下?
回復(fù)@王小五 好的。謝謝 方便的話(huà)把整個(gè)安裝包一起發(fā)給我。我這里不知道下載的。好多都不全面 麻煩發(fā)郵件2399943920@qq.com 謝謝了
<div class="page-header-search margin-top-10"> <form class="search-form" action="{WEB_DIR}index.php" method="get"> <input type="hidden" name="s" value="api"> <input type="hidden" name="c" value="api"> <input type="hidden" name="m" value="search"> <input type="hidden" name="dir" id="dr_search_module_dir" > <div class="input-group"> <div class="input-group-btn btn-group"> <button id="dr_search_module_name" type="button" class="btn default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <i class="fa fa-angle-down"></i> </button> <ul class="dropdown-menu"> <!--這是來(lái)列出全部可以搜索的內(nèi)容模塊--> {php $top_search=[];} {cache name=module-content} {if $t.search} {php !$top_search && $top_search=$t;} <li><a href="javascript:dr_search_module_select('{$t.dirname}', '{$t.name}');"> {$t.name} </a></li> {/if} {/cache} </ul> </div> <input type="text" placeholder="搜索內(nèi)容..." name="keyword" class="fc-search-keyword form-control"> <div class="input-group-btn"> <button class="btn default" type="submit"> <i class="fa fa-search"></i> </button> </div> </div> <script> // 這段js是用來(lái)執(zhí)行搜索的 function dr_search_module_select(dir, name) { $("#dr_search_module_dir").val(dir); $("#dr_search_module_name").html(name+' <i class="fa fa-angle-down"></i>'); } dr_search_module_select('{php echo MOD_DIR ? MOD_DIR : $top_search.dirname}', '{php echo MOD_DIR ? MODULE_NAME : $top_search.name}'); </script> </form> </div> </div> </div>
參考文檔:《內(nèi)容模塊搜索框?qū)懛ā?/a>
參考文檔:《循環(huán)模塊名稱(chēng)》
結(jié)合兩個(gè)文檔
開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
http://demo4.xunruicms.com/
默認(rèn)模板就有這個(gè)代碼呀,復(fù)制參考
回復(fù)@迅睿框架聯(lián)合創(chuàng)始人
剛接觸這個(gè)cms 不是很懂..
回復(fù)@展望未來(lái) 看了演示了 只有一段
<div class="page-header-search"> </div>這個(gè)里面有官方寫(xiě)的
回復(fù)@王小五
下載的版本只有這個(gè)?。?/p>
那我就不清楚了,我是這個(gè)月下的,你再下載看看。
回復(fù)@王小五 剛剛我還下載了 就是這樣!難道免費(fèi)用戶(hù)都是這樣的?方便把代碼分享一下?
回復(fù)@王小五 好的。謝謝 方便的話(huà)把整個(gè)安裝包一起發(fā)給我。我這里不知道下載的。好多都不全面 麻煩發(fā)郵件2399943920@qq.com 謝謝了
<div class="page-header-search margin-top-10"> <form class="search-form" action="{WEB_DIR}index.php" method="get"> <input type="hidden" name="s" value="api"> <input type="hidden" name="c" value="api"> <input type="hidden" name="m" value="search"> <input type="hidden" name="dir" id="dr_search_module_dir" > <div class="input-group"> <div class="input-group-btn btn-group"> <button id="dr_search_module_name" type="button" class="btn default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <i class="fa fa-angle-down"></i> </button> <ul class="dropdown-menu"> <!--這是來(lái)列出全部可以搜索的內(nèi)容模塊--> {php $top_search=[];} {cache name=module-content} {if $t.search} {php !$top_search && $top_search=$t;} <li><a href="javascript:dr_search_module_select('{$t.dirname}', '{$t.name}');"> {$t.name} </a></li> {/if} {/cache} </ul> </div> <input type="text" placeholder="搜索內(nèi)容..." name="keyword" class="fc-search-keyword form-control"> <div class="input-group-btn"> <button class="btn default" type="submit"> <i class="fa fa-search"></i> </button> </div> </div> <script> // 這段js是用來(lái)執(zhí)行搜索的 function dr_search_module_select(dir, name) { $("#dr_search_module_dir").val(dir); $("#dr_search_module_name").html(name+' <i class="fa fa-angle-down"></i>'); } dr_search_module_select('{php echo MOD_DIR ? MOD_DIR : $top_search.dirname}', '{php echo MOD_DIR ? MODULE_NAME : $top_search.name}'); </script> </form> </div> </div> </div>