I'm not seeing the pagination appear in a list of blog posts. The code:
This code will list out 60 articles on a single page before pagination kicks in.
Can you tell me which spot the code should go?
Sure, the pagination should go inside the blog/post_in_column.html template. You'd want to move your template to there at the end in between <perch:after></perch:after> tags so it renders after the count setting in the function is reached.
You will also want to count lower to something like 5 or 10 so that you get pagination kicking in - basically it will split your posts into pages containing that many posts. 60 is way too much.
The default sample in the app is thus but you can adapt it to whatever you want - including a template (if that is what you want) using the <perch:template path="blah"> tags.Code
- <perch:if exists="paging">
- <div class="paging">
- Page <perch:blog id="current_page" /> of <perch:blog id="number_of_pages" />
- <perch:blog id="page_links" encode="false" />
- <perch:if exists="not_first_page">
- <a href="<perch:blog id="prev_url" encode="false" />">Previous</a>
- <perch:if exists="not_last_page">
- <a href="<perch:blog id="next_url" encode="false" />">Next</a>
Hope this helps!
yay! That did it. I was missing part of the perch:after tag. Thanks!