简单搜索给出 404 页面结果
Simple search gives 404 page for results
EE2.9.2。简单搜索表单:
{exp:search:simple_form channel="home|about|network|community|pages|people|news" search_in="entries" result_page="search/results" form_id="search_form"}
<input type="text" name="keywords" id="search" placeholder="Search" />
{/exp:search:simple_form}
结果页面:
<h2>Search results for “{exp:search:keywords}”</h2>
<p>Your search returned {exp:search:total_results} results.</p>
{exp:search:search_results}
{if count == 1}
{/if}
<h3><a href="{if page_url}{page_url}{if:else}{auto_path}{/if}">{title}</a> - {channel_id}</h3>
<!-- page_url is {page_url} entry_id is {entry_id} -->
<p>{excerpt}<br><strong><a href="{if page_url}{page_url}{if:else}{auto_path}{/if}">Read more→</a></strong></p>
{/exp:search:search_results}
数字 2 是频道 ID - 它也没有给我跨频道的结果。
没关系,你们大家。这是我的代码中的一个错误。不要将频道条目标签包裹在搜索结果周围,它不喜欢那样!
EE2.9.2。简单搜索表单:
{exp:search:simple_form channel="home|about|network|community|pages|people|news" search_in="entries" result_page="search/results" form_id="search_form"}
<input type="text" name="keywords" id="search" placeholder="Search" />
{/exp:search:simple_form}
结果页面:
<h2>Search results for “{exp:search:keywords}”</h2>
<p>Your search returned {exp:search:total_results} results.</p>
{exp:search:search_results}
{if count == 1}
{/if}
<h3><a href="{if page_url}{page_url}{if:else}{auto_path}{/if}">{title}</a> - {channel_id}</h3>
<!-- page_url is {page_url} entry_id is {entry_id} -->
<p>{excerpt}<br><strong><a href="{if page_url}{page_url}{if:else}{auto_path}{/if}">Read more→</a></strong></p>
{/exp:search:search_results}
数字 2 是频道 ID - 它也没有给我跨频道的结果。
没关系,你们大家。这是我的代码中的一个错误。不要将频道条目标签包裹在搜索结果周围,它不喜欢那样!