I have an ExpressionEngine site that takes information entered from an admin, and information entered from users through SafeCracker, and displays that information in a timeline format.

The information that is entered has a custom field called {story_year}. We use that field to sort the entries based on the entered date. This means that users can specify a date, as well as admins.

Because showing hundreds of entries at once takes a long time load, we've introduced pagination. But that pagination breaks it up arbitrarily by amount.

Is there a way to paginate by {story_year}? Possibly conditionals like:

{if story_year >= "2010" }
    <li><a href="{pagination_url}" class="{if current_page}active{/if}">&bull;</a></li>
{if:elseif story_year >= "2000"}
    <li><a href="{pagination_url}" class="{if current_page}active{/if}">&bull;</a></li>

Relevant URLs are here: http://thinkx.net/clients/manship/index.php/timeline - the ultimate display of the timeline. http://thinkx.net/clients/manship/index.php/Timeline/add - the field entries we sort by.

1 Answer 1


There isn't a way to do this with native pagination.

Take a look at the YearList addon to see if you can get something working with that.

Fetches the distinct years of all entries in a specified weblog. Can be used to create a year archive list.

The Year Listing plugin is a simple way to get a distinct 4 digit year for your entries. This way you can list out years for archives.

{exp:yearlist channel="yourchannel" category="1"}
{year} {/exp:yearlist}

That will return an array of years. Use {year} to print them to the screen and wrap in any markup needed. There are currently no linebreaks or HTML associated with this plugin.

You can pull the year from the URL and use it with your entries tag to pull entries for just that year.

You'll need to make sure your entry date year matches your custom field year or you can try hacking this addon to pull from your custom field instead of the entry date field.

  • If I'm reading that correctly, you're saying I can use {story_year} instead of {year}? I'll look into that. Thanks! Commented Mar 6, 2013 at 14:27
  • No, I'm saying if your entry date matches your story_year field, you can use {year}. Or you can look at the code for this addon and perhaps adjust to meet your needs.
    – Anna_MediaGirl
    Commented Mar 6, 2013 at 16:29
  • Got it. I don't think there's a way to do what I'm asking without writing something custom. What we're trying to do is simplify manship100.com/timeline to speed it up. It looks like optimization is our answer, which is another thing I don't know much about heh. Thanks for your help! Commented Mar 6, 2013 at 16:35
  • Try this... JS for pagination and CE Cache using the static driver for caching. The page will be insanely fast.
    – Anna_MediaGirl
    Commented Mar 6, 2013 at 17:06
  • 1
    I'm actually attempting to implement infinite scroll right now. It still isn't working but it's close. But pagination is working great! Super fast now. Commented Mar 14, 2013 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.