I'd like increase the number of posts per page. Is there some sort of option that I can add to this line, and others like it?
Same issue on streams:
{{ page.activity_stream.activities_following | paginate }}
In reviewing various flavors of Liquid documentation, I've seen :per_page, and paginate.page_size, but so far, no success.
I'm sure there are other pagination options that could also be documented, as well, for instance:
paginate.next.title
paginate.previous.title
In general, I'm interested in reducing mouse clicks, the primary current motivation for this inquiry.
Expanding on this question, a bit, it would also be helpful to have more documentation on all of the template variable filters.
For blogs, there is a setting in the control panel for the number of posts you want to display.
Aside from that, there isn't any way to adjust the number of items included in a page.
There are a couple of options on the paginate filter itself: {{ page.activity_stream.activities_following | paginate 'anchor', 'Previous', 'Next' }}
'anchor' will add an anchor tag called whatever you want to the pagination. The other two change the names of the links for previous and next.
Showing 13 reactions
Sign in with
Check by cStreet - Mobile event check-in for organizers
Certified Architect
Certified Developer
Good luck!
Certified Expert
In our case, we unfortunately had to go back and reorder the “published at” dates… I will take some time later to figure out if this can be sorted by other variables (like event.local_start_at), but we’re in a hurry to launch and this was the quickest way of doing things for now. Your code snippet was a lifesaver! You rock! Thanks!
Check by cStreet - Mobile event check-in for organizers
Certified Architect
Certified Developer
You might need to fuss with this a bit, because I don’t have the specific syntax in front of me, but the general idea is to assign a variable to the sorted forloop:
{% assign ordered_children = page.children | sort: ‘published_at’ %}
{% for event in ordered_children %}
{% if event.type_name == “Event” %}
Have fun!
Certified Expert
Certified Expert
Check by cStreet - Mobile event check-in for organizers
Certified Architect
Certified Developer
Instead of using {% for event in page.calendar.events_upcoming } which limits to 10 posts before paginating, use { for event in page.children %}
If you have other subpages you want to skip then use:
{% for event in page.children }
{ if event.type_name == “Event” %}
Sneaky!
Check by cStreet - Mobile event check-in for organizers
Certified Architect
Certified Developer
Instead of using {% for event in page.calendar.events_upcoming } which limits to 10 posts before paginating, use { for event in page.children %}
If you have other subpages you want to skip then use:
{% for event in page.children }
{ if event.type_name == “Event” %}
Sneaky!
Check by cStreet - Mobile event check-in for organizers
Certified Architect
Certified Developer
I realize that this may impact server demands (?) but I guess I make the case that the current per_page default is simply too low.