我建立了一个网站,其中有八个通道,分为两个部分。ExpressionEngine中的导航和分页问题
其中一个部分被称为“文章”,在该部分有两个频道,“功能”和“新闻”。
一切工作都很好,直到我将分页引入到等式中。
在文章索引页,我有“最新”,“功能”和“新闻”标签,然后我通过他们,并选择条目导航基于段:
<ul id="tabs">
<li>{if segment_2 == ''}<strong>Latest</strong>{if:else}<a href="{site_url}articles/">Latest</a>{/if}</li>
<li>{if segment_2 == 'features'}<strong>Features</strong>{if:else}<a href="{path=articles/features}">Features</a>{/if}</li>
<li>{if segment_2 == 'news'}<strong>News</strong>{if:else}<a href="{path=articles/news}">News</a>{/if}</li>
</ul>
{if segment_2 == ''}{exp:channel:entries channel="features|news" limit="10" dynamic="no" order="date" paginate="both"}{/if}
{if segment_2 == 'features'}{exp:channel:entries channel="features" limit="10" dynamic="no" order="date" paginate="both"}{/if}
{if segment_2 == 'news'}{exp:channel:entries channel="news" limit="10" dynamic="no" order="date" paginate="both"}{/if}
site.com/articles系统会显示所有条目
site.com/articles/features/的特点带来了所有条目通道
site.com/articles/news/在新闻频道带来了所有条目
这个伟大的工程,直到有一个拥有多个页面的频道等等将“P4”添加到URL中,然后{segment_2}中未筛选的索引变为P4,而不是我在导航通道条目时所做的操作。
分页网址: site.com/articles/P4
我想我的问题是这样的:
我是不是导航或正确过滤条目?如果是这样,我现在如何与分页?
谢谢!
我认为你的首选解决方案是要走的路。 – Tom 2011-06-07 14:55:09