我在配置搜索结果时遇到问题,并链接到该特定结果。
我设置了频道搜索偏好设置,以便{auto_path}链接到相关的模板组和模板,我对此毫无困难。
我唯一遇到的麻烦是,当您点击结果标题时,当您被发送到显示特定条目的页面时,它会显示最新的条目,而不是显示该特定条目。那个频道。
我还注意到,当您点击结果时,应显示的网址为:
http://www.mywebsite.com/ee_site/index.php?/template_group/template/entry
实际呈现为:
http://www.mywebsite.com/ee_site/index.php?/template_group/template/?/entry
模板和条目之间的额外'?/'是什么?
以下是结果页面的代码:
{embed="embeds/html-head" page_title="Blog"}
<body>
<div id="container">
{embed="embeds/header"}
{embed="embeds/navigation"}
<div id="hero">
<div id="heading">
<div id="title">
<h2>{exp:search:total_results} RESULT(S) FOR {exp:search:keywords}</h2>
</div>
</div>
<div id="blog">
<ul>
{exp:search:search_results}
<div class="blog">
<li class="search_results"><strong><a href="{auto_path}">{title}</a></strong> from <em>{channel}</em>
<br/>
{excerpt}
<br/>
</li>
</div>
{/exp:search:search_results}
</ul>
</div>
</div>
{embed="embeds/footer"}
</div>
</body>
</html>
以下是图库条目的代码
{embed="embeds/html-head"}
<body>
<div id="container">
{embed="embeds/header"}
{embed="embeds/navigation"}
<div id="hero">
<div id="heading">
{exp:channel:entries channel="gallery" limit="1" disable="pagination"}
<div id="title">
<h2>Gallery</h2>
</div>
<div id="story_title">
<h2>{title}</h2>
</div>
</div>
<div id="video_main">
<img class="image" src="{image}" alt="{title}">
</div>
<div id="featured" class="main">
<p>{info}</p>
<p class="url">{source}</p>
</div>
{/exp:channel:entries}
{embed="embeds/footer"}
</div>
</body>
</html>
在类别页面上,当您单击某个条目并进入此页面时,它会显示单击的特定条目,因此我知道该方面没有任何问题。
任何建议/解决方案都会非常感激,我确信这是一件很小的事情,我只是没有发现!