Hey all.
I have in my website multiple blogs. (Real-estate, Health etc…)
And I’ve created another blog which is called ‘all’ and presents all of the articles from all blogs.
What I’m trying to do is to add pagination to the ‘all’ blog.
In a specific blog I’m using:
{% paginate blog.articles by 10 %}
But in the ‘all’ blog I can’t use the same method because I’m not looping over blog.articles, I’m looping over an array that I’m creating: (‘all_articles’)
{% if blog.title == 'all' %}
{% assign all_articles = [] %}
{% for link in linklists.blogs.links %}
{% assign blog = link.object %}
{% assign blog_articles = blog.articles %}
{% assign all_articles = all_articles | concat: blog_articles %}
{% endfor %}
{% assign all_articles = all_articles | sort: "published_at" | reverse %}
{% endif %}
And ‘all_articles’ is not paginateable.
I don’t mind doing the pagination on the client-side, just want it to be on separate pages.
Any suggestions to some walkaround?