我有一个博客,列出文章,当点击链接显示完整的文章,它返回相同的文章,这恰好是最新的。我已经确认了所有3篇文章都是开放的。下面是我的文章模板条目标签:
{exp:channel:entries channel="news" limit="1" dynamic="no" disable="categories|member_data|pagination" }
我也试过使用dynamic on,但也不起作用。
{exp:channel:entries channel="news" dynamic="off" status="Open|Featured"}
<div class="entry">
<p class="title"><a href="{path='news/{title}'}">{title}</a></h2>
<p class="date meta">{entry_date format="%M %j, %Y"}</p>
<div class="entry-content">
{news_summary}
</div>
</div>
{/exp:channel:entries}发布于 2012-11-29 03:41:40
我假设你想在/news/the-title-of-the-post上看到全文
对于完整的文章模板,您不需要dynamic="no"。将其关闭或显式设置为dynamic="yes"。
在您的listing模板中,对于您的href尝试{url_title_path},它会将URL标题附加到您选择的模板/组:
<p class="title"><a href="{url_title_path='news'}">{title}</a></h2>实际情况是,您加载的是与/news/The%20Title%20of%20The%20Post标题不匹配的URL。然后,因为EE找不到任何匹配的URL标题和您有dynamic="no"的,所以不管URL是什么,它都会显示最新的文章。
https://stackoverflow.com/questions/13611272
复制相似问题