We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Pagination on a series landing page

Development and Programming

rjionline's avatar
rjionline
37 posts
10 years ago
rjionline's avatar rjionline

On the new website we’re developing, we’ve created what we’re calling series — a series of entries collected together under a common banner, like a newspaper column.

Series are a separate channel from stories. A series landing page is just supposed to display a list of teasers that link to the stories that fall within it.

Unfortunately, for some reason we can’t get pagination to work on the series landing pages. I was hoping someone here might have some suggestions for us.

Here’s the template for the series.

{html_head}
 <title>
 Post Series | RJI
 </title>
 {head_content}
{html_head_end} 
{embed="main/_navbar"}

<ol class="breadcrumb">
 <li><a href="http://{site_url}">Home</a></li>
 <li><a href="http://{path=stories/index}">Stories</a></li>
 <li class="active">Series</li>
</ol>

<div id="main-section" class="container">
<div class="row">
    
 <div class="col-md-8 col-sm-12">
  <div class="page-header">
   <h2>Post Series</h2>
  </div>
     
   <div class="card-bg">
  <ul id="recent-posts" class="media-list">
    {exp:channel:entries channel="series" disable="categories|member_data|pagination"}
     <li class="media card">
      <a href="http://{post_path}class=pull-left">_       {!-- If there is a news image, use that, else maybe it's an event so if there is an event image use that, else there is no given image, use default image --}_       {if series_image}_        {series_image}_       {url:rect}_      {/series_image}_       {if:elseif series_banner}_      {series_banner}_       {url:rect}_      {/series_banner}_       {if:else}_         {site_url}/images/posts/rji-post.jpg_       {/if}_      </a>
      <div class="media-body">
       <h4 class="media-heading"><a href="http://{post_path}">{title}</a>
<span class="small capitalize">{entry_date format="%F %j, %Y"}</span></h4>
       {exp:trunchtml chars="256" exact="yes" ending="..."}{series_description}{/exp:trunchtml}
      </div>
     </li>
    {/exp:channel:entries}
  </ul>
  </div>
    
    </div>
    
    <div id="sidebar" class="col-md-4 hidden-sm hidden-xs"> 
    {embed="main/_sidebar" recent="YES" events="YES" related="NO" topics="NO"}
    </div>
 
</div>
</div>

{page_end}
{/if}

Thanks.

L.

       
rjionline's avatar
rjionline
37 posts
10 years ago
rjionline's avatar rjionline

Just a note: I see that pagination has been disabled in the template. My assistant did that while trying to make the template work. The problem is that trying to move to another page of teasers displays a 404 error.

L.

       
Boyink!'s avatar
Boyink!
5,011 posts
10 years ago
Boyink!'s avatar Boyink!

I don’t see pagination code?

       
rjionline's avatar
rjionline
37 posts
10 years ago
rjionline's avatar rjionline

Whoops. I forgot the pagination code was in a separate snippet.

{!-- Using custom pagination so Bootstrap CSS can work (need classes .pagination .page-first .page-last) --}
{paginate}
  {pagination_links}
 <ul class="pager">
   {previous_page}
    <li class="previous"><a href="http://{pagination_url}#recent-posts">← Newer</a></li>
   {/previous_page}
   {next_page}
  <li class="next"><a href="http://{pagination_url}#recent-posts">Older →</a></li>
   {/next_page}
 </ul>
  {/pagination_links}
{/paginate}
       
Boyink!'s avatar
Boyink!
5,011 posts
10 years ago
Boyink!'s avatar Boyink!

So what URLs are being generated? And do you have .htaccess or anything else that would affect URLs?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.