简单搜索为结果提供404页面

时间:2015-01-27 01:03:51

标签: search http-status-code-404

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 &ldquo;{exp:search:keywords}&rdquo;</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&rarr;</a></strong></p>
                {/exp:search:search_results}

Here's what output looks like

数字2是频道ID - 它不会在频道上提供结果。

1 个答案:

答案 0 :(得分:0)

没关系,y&#39;所有。这是我的代码中的错误。不要在搜索结果周围打一个频道条目标签,它不是那样的!