迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
為什么搜索頁面里面當(dāng)前欄目的name和聯(lián)動菜單會失效
你的搜索代碼是怎么寫的?
回復(fù)@迅??蚣芗夹g(shù)-張洪
參考文檔:《內(nèi)容模塊搜索框?qū)懛ā?/a>
還是不行,搜索頁面內(nèi)還是顯示不出來
回復(fù)@迅睿框架技術(shù)-張洪
新的代碼你是如何寫的
他這個是根據(jù) 欄目ID來做面包屑的
你如果搜索頁沒有帶 catid= 那自然是不會出來的啊
{dr_catpos($catid, '', true, '<li><a href="[url]">[name]</a><i class="fa fa-circle"></i></li>')}
<li>
<span>搜索</span>
</li>
官方默認(rèn)模板后面是寫死的一個 搜索 字樣!這樣就避免了沒 CATID 時丟失問題
這是搜索的代碼,搜索內(nèi)頁還是剛剛的那個
那你少寫了欄目變變量,把代碼發(fā)出來我改改
那如果要正常顯示,大佬該怎么寫呢
回復(fù)@小黃人 18html
這是搜索的
{template header.html}
{template "navigation.html"}
<div class="page_edit page_search" >
<form class="search-form" action="/index.php" method="get">
<input type="hidden" name="s" value="rules">
<input type="hidden" name="c" value="search">
<input type="text" placeholder="請輸入關(guān)鍵字" name="keyword" class="sr_input" size="38">
<input type="submit" value="搜索" class="sr_but" name="Submit"/>
</form>
</div>
<ul class="page_edit">
{module catid=$catid order=updatetime page=1}
<a href="{$t.url}" target="_self" class="zl_name"><i class="fa fa-angle-right"></i> {$t.title}</a>
{/module}
</ul>
{$pages}
{template "footer.html"}
<form class="search-form" action="/index.php" method="get"> <input type="hidden" name="s" value="rules"> <input type="hidden" name="c" value="search"> <input type="hidden" name="catid" value="{$catid}"> <input type="text" placeholder="請輸入關(guān)鍵字" name="keyword" class="sr_input" size="38"> <input type="submit" value="搜索" class="sr_but" name="Submit"/> </form>
這是搜索內(nèi)頁的
{template "header.html"}
<div class="position"><h3>{$cat.name}</h3> <div class="mbx">您現(xiàn)在的位置: 首頁 {dr_catpos($catid, '', true, '<font> > </font> <span> [name] </span>')}</div></div>
<div class="col-md-6">
<div class="input-group">
<input type="text" class="sr_input" onkeypress="if(event.keyCode==13) {dr_module_search('search_keyword');return false;}" name='keyword' value='{$keyword}' id='search_keyword'>
<button class="sr_but" onclick="dr_module_search('search_keyword')" type="button"> 搜索</button>
{template "search_data.html"}
{if !$count}
<div class="row fc-search-null">
<div class="col-md-12 text-center">
<i class="fa fa-close fc-search-null-icon"></i>
<label class="fc-search-null-txt">沒有找到相關(guān)內(nèi)容...</label>
{/if}
<script>
// 這段js是用來執(zhí)行搜索的
function dr_module_search(name) {
var url="{Router::search_url($params, 'keyword', 'dayruicom')}";
var value = $("#"+name).val();
if (value) {
location.href=url.replace('dayruicom', value);
} else {
$("#"+name).focus()
dr_tips(0, "輸入關(guān)鍵字");
}
return false;
</script>
這里模板里面是什么內(nèi)容,我沒有見過這種寫法的加載方式
是這個,搜索的結(jié)果
那就沒有問題了,標(biāo)準(zhǔn)的搜索標(biāo)簽,完美了
你沒見過?
你發(fā)出來是我第一次見到這種寫法
還是沒奏效
那就有點奇怪了
安裝一個遠(yuǎn)程協(xié)助工具,只能我看了才能下結(jié)論:http://223987.com/aq/47.html
你的搜索代碼是怎么寫的?
回復(fù)@迅??蚣芗夹g(shù)-張洪
參考文檔:《內(nèi)容模塊搜索框?qū)懛ā?/a>
還是不行,搜索頁面內(nèi)還是顯示不出來
回復(fù)@迅睿框架技術(shù)-張洪
新的代碼你是如何寫的
他這個是根據(jù) 欄目ID來做面包屑的
你如果搜索頁沒有帶 catid= 那自然是不會出來的啊
{dr_catpos($catid, '', true, '<li><a href="[url]">[name]</a><i class="fa fa-circle"></i></li>')}
<li>
<span>搜索</span>
</li>
官方默認(rèn)模板后面是寫死的一個 搜索 字樣!這樣就避免了沒 CATID 時丟失問題
這是搜索的代碼

,搜索內(nèi)頁還是剛剛的那個
回復(fù)@迅??蚣芗夹g(shù)-張洪
那你少寫了欄目變變量,把代碼發(fā)出來我改改
那如果要正常顯示,大佬該怎么寫呢
回復(fù)@小黃人 18html
這是搜索的
{template header.html}
{template "navigation.html"}
<div class="page_edit page_search" >
<form class="search-form" action="/index.php" method="get">
<input type="hidden" name="s" value="rules">
<input type="hidden" name="c" value="search">
<input type="text" placeholder="請輸入關(guān)鍵字" name="keyword" class="sr_input" size="38">
<input type="submit" value="搜索" class="sr_but" name="Submit"/>
</form>
</div>
<ul class="page_edit">
{module catid=$catid order=updatetime page=1}
<a href="{$t.url}" target="_self" class="zl_name"><i class="fa fa-angle-right"></i> {$t.title}</a>
{/module}
</ul>
{$pages}
</div>
{template "footer.html"}
回復(fù)@迅睿框架技術(shù)-張洪
這是搜索內(nèi)頁的
{template "header.html"}
<div class="position"><h3>{$cat.name}</h3> <div class="mbx">您現(xiàn)在的位置: 首頁 {dr_catpos($catid, '', true, '<font> > </font> <span> [name] </span>')}</div></div>
<div class="page_edit page_search" >
<div class="col-md-6">
<div class="input-group">
<input type="text" class="sr_input" onkeypress="if(event.keyCode==13) {dr_module_search('search_keyword');return false;}" name='keyword' value='{$keyword}' id='search_keyword'>
<button class="sr_but" onclick="dr_module_search('search_keyword')" type="button"> 搜索</button>
</div>
</div>
</div>
<ul class="page_edit">
{template "search_data.html"}
{if !$count}
<div class="row fc-search-null">
<div class="col-md-12 text-center">
<i class="fa fa-close fc-search-null-icon"></i>
<label class="fc-search-null-txt">沒有找到相關(guān)內(nèi)容...</label>
</div>
</div>
{/if}
</ul>
<script>
// 這段js是用來執(zhí)行搜索的
function dr_module_search(name) {
var url="{Router::search_url($params, 'keyword', 'dayruicom')}";
var value = $("#"+name).val();
if (value) {
location.href=url.replace('dayruicom', value);
} else {
$("#"+name).focus()
dr_tips(0, "輸入關(guān)鍵字");
}
return false;
}
</script>
</div>
{template "footer.html"}
回復(fù)@迅??蚣芗夹g(shù)-張洪
這里模板里面是什么內(nèi)容,我沒有見過這種寫法的加載方式
是這個,搜索的結(jié)果
回復(fù)@迅??蚣芗夹g(shù)-張洪
那就沒有問題了,標(biāo)準(zhǔn)的搜索標(biāo)簽,完美了
回復(fù)@迅??蚣芗夹g(shù)-張洪
你沒見過?
你發(fā)出來是我第一次見到這種寫法
還是沒奏效
回復(fù)@迅睿框架技術(shù)-張洪
那就有點奇怪了
安裝一個遠(yuǎn)程協(xié)助工具,只能我看了才能下結(jié)論:http://223987.com/aq/47.html