Note that there are some explanatory texts on larger screens.

plurals
  1. PONavigation and pagination issues in ExpressionEngine
    primarykey
    data
    text
    <p>I’ve set up a site with eight channels divided into two sections.</p> <p>One of the sections is called “Articles” and within that section there are two channels, “Features” and “News”.</p> <p>Everything was working great until I introduced pagination into the equation.</p> <p>On the Articles index page, I have tabs for “Latest”, “Features” and “News” and I navigate through them and select entries based on the segment:</p> <pre><code>&lt;ul id="tabs"&gt; &lt;li&gt;{if segment_2 == ''}&lt;strong&gt;Latest&lt;/strong&gt;{if:else}&lt;a href="{site_url}articles/"&gt;Latest&lt;/a&gt;{/if}&lt;/li&gt; &lt;li&gt;{if segment_2 == 'features'}&lt;strong&gt;Features&lt;/strong&gt;{if:else}&lt;a href="{path=articles/features}"&gt;Features&lt;/a&gt;{/if}&lt;/li&gt; &lt;li&gt;{if segment_2 == 'news'}&lt;strong&gt;News&lt;/strong&gt;{if:else}&lt;a href="{path=articles/news}"&gt;News&lt;/a&gt;{/if}&lt;/li&gt; &lt;/ul&gt; {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} </code></pre> <p>site.com/articles brings up all entries<br> site.com/articles/features/ brings up all entries in the Features channel<br> site.com/articles/news/ brings up all entries in the News channel </p> <p>This works great until there is a channel with multiple pages and something like “P4” is added to the URL and then {segment_2} for the unfiltered index becomes P4 instead of what I am doing to navigate the channel entries.</p> <p>Paginate URL: site.com/articles/P4</p> <p>I guess my question is this: </p> <p>Am I navigating or filtering entries correctly? If so how would I do so now with pagination?</p> <p>Thanks! </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload