This project is read-only.
1
Vote

Add pagination (Older Entries/Newer Entries) to AtomSite blog

description

My colleagues and I are building a blog using AtomSite. We would like to add pagination -- i.e., Older Entries/Newer Entries buttons -- to the bottom of the blog's main column on the home page, like the buttons that appear here: http://atomsite.net/blog.xhtml. In addition, we want to have the pagination links appear at the bottom of the landing pages that have been set up for categories we created (the landing pages are supposed to compile all the posts that use the specific category.)
 
However, we are unable to:
1) Make pagination appear on our home page (like it does on http://atomsite.net/blog.xhtml)
2) Make more than the 10 most recent posts appear on the category landing pages, as well as make pagination appear. The problem is similar to what we're seeing in the BlogSvc category landing page (http://atomsite.net/blog/category/BlogSvc.xhtml), where there should be 28 total posts, but only 10 appear, and with no Older Entries/Newer Entries buttons that would allow us to see the other 18 posts.
 
We see the same problem on the AtomSite category (17 posts), Release (15 posts), and Website (11 posts) categories:
http://atomsite.net/blog/category/AtomSite.xhtml
http://atomsite.net/blog/category/Release.xhtml
http://atomsite.net/blog/category/Website.xhtml
 
On all of these, you can only see/access the first 10 most recent posts, with no pagination to allow the user to see older posts.

Browsing the source code for these pages, the following code shows up, just like on the blog we're building, but nothing appears between the divs:
<div id="pagenav"></div>  
However, on the backend side of the blog we're building, this is the code between those divs:
 
<div id="pagenav">
    <% if (Url.GetNextPage(Model.Feed.Links) != null) {%>
        <a class="next" href="<%= Url.GetNextPage(Model.Feed.Links) %>">Previous</a>
    <%} %>
    <% if (Url.GetPrevPage(Model.Feed.Links) != null) {%>
        <a class="prev" href="<%= Url.GetPrevPage(Model.Feed.Links) %>">Next</a>
    <%} %>
</div>
 
We'd GREATLY appreciate suggestions as to how we can make the Older Entries/Newer Entries links work on our home page as well as on our category landing pages.
 
Thanks in advance for your help.

comments

jarrettv wrote Aug 18, 2010 at 3:04 PM

There must be an issue with those GetNextPage and GetPrevPage functions. I'll take a look.

wrote Feb 14, 2013 at 1:50 AM