EllisLab text mark
Advanced Search
     
Paginate a filtered Channel
Posted: 29 June 2012 07:08 PM   [ Ignore ]
Joined: 2009-07-20
33 posts

Is it possible to add pagination when a channel entry is filtered by a url_title? When I have the below code, the pagination will not show up. If I remove the url_title from the channel entry, the pagination displays fine.

{exp:channel:entries channel="work" url_title="{last_segment}"}
     
<h1>url_title</h1>
  
     
{paginate}
          {if previous_page}
<a href="{auto_path}">Previous Page</a> &nbsp;{/if}
          {if next_page}
<a href="{auto_path}">Next Page</a>{/if}
     {
/paginate}
{
/exp:channel:entries} 
 
Posted: 30 June 2012 09:36 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2009-09-11
311 posts

If you supply a url_title, won’t that only provide a single result?  (the one and only one channel entry with that URL title?)

If there’s only one result, it would be impossible to paginate.

 
Posted: 03 July 2012 11:19 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey Zero Style,

Thank you for posting your question here on the ExpressionEngine forums.

Mark is right, essentially you are giving a limit of one, which would not be paginated.

I hope this helps!

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade