Expression Engine 2 下一个/上一个条目与完整条目列表的链接
我想在 EE2 中使用下一个/上一个条目链接技术:
{exp:channel:next_entry}
<p>Next entry: <a href="{path='site/comments'}">{title}</a></p>
{/exp:channel:next_entry}
{exp:channel:prev_entry}
<p>Previous entry: <a href="{path='site/comments'}">{title}</a></p>
{/exp:channel:prev_entry}
当它起作用时,我在一个条目 ie 上。 Awesome.com/index.php/my-cool-entry
,我可以点击页面浏览该频道中的条目。
当我查看一篇文章时,是否还可以显示此页面上的条目的完整列表?我希望能够显示条目列表作为导航到特定文章的方式。
将其视为 {pagination_links}
构建链接的方式: 首页 < 1 2 3 >最后一页除了数字之外我想显示该条目的部分内容,而不仅仅是数字。
令我困扰的是 {paginate}
生成丑陋的 URL ie。 Awesome.com/index.php/articles/P1
,我宁愿有 awesome.com/index.php/articles/my-cool-entry
。 exp:channel:next_entry/prev_entry
保留 URL_title!
有没有一个插件可以处理这种事情?
I want to use the Next/Previous Entry Linking technique in EE2:
{exp:channel:next_entry}
<p>Next entry: <a href="{path='site/comments'}">{title}</a></p>
{/exp:channel:next_entry}
{exp:channel:prev_entry}
<p>Previous entry: <a href="{path='site/comments'}">{title}</a></p>
{/exp:channel:prev_entry}
When this works, I'm on a single entry ie. awesome.com/index.php/my-cool-entry
, I can click page through the entries in that channel.
Is it possible to ALSO display a full list of the entries on this page while I'm looking at one article? I want to be able to show the list of entries as a way to navigate to a particular article.
Think of it like the way {pagination_links}
builds links:
First Page < 1 2 3 > Last Page except instead of numbers I want to display parts of that entry, rather than just a number.
What bothers me is that {paginate}
generates ugly URLs ie. awesome.com/index.php/articles/P1
, I'd rather have awesome.com/index.php/articles/my-cool-entry
. exp:channel:next_entry/prev_entry
preserves the URL_title!
Is there a plug-in that can handle this kind of thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嵌入模板是正确的方法。
使用
{exp:channel:entries}
循环创建一个新模板。在其中您可以转储您想要的条目并显示您想要从中获得的任何信息。需要确保的一件事是在
{exp:channel:entries}
中使用dynamic="no"
参数。它会像这样:在您的文章页面中,嵌入另一个模板:
并在
article/full_list
模板中使用如下循环:Embedding a template is the way to go.
Create a new template with an
{exp:channel:entries}
loop. Within that you can dump out the entries you want and display any info you want from them.One thing to make sure of is to use the
dynamic="no"
parameter within the{exp:channel:entries}
. It'll go something like this:In your article page, embed another template:
And within the
article/full_list
template use a loop like: