ERROR 2017/05/18 14:27:03 theme/partials/recent_posts_blog.html template: theme/partials/recent_posts_blog.html:20:29: executing “theme/partials/recent_posts_blog.html” at <.Paginate>: error calling Paginate: invoked multiple times with different arguments
I have /layouts/index.html which calls both these partials.
The error message is pretty clear: It is not supported with two paginagors on one page, “/page/1” then … what do we do with the second? We may make some magic in this department in the future, but that is a big maybe.
You will have to figure a way to exclude one or both of the paginators.
If I understand you correctly, you want page 1 of the home page to contain, say, 5 articles from section news and 5 from blog, and page 2 to contain the next five articles from each, etc.
The primary problem is that unless news and blog have exactly the same number of articles, one of them will eventually be empty, so if you want enough pages for every article, you must know in advance which one is longer, and make it the argument to .Paginate.
With that, you could display the second section (after the .Paginate is defined) with something like this:
Hello guys, just checking back to see if there is any progress on that front?
I still have the need to have pagination of different sections on the main page.
Yes, guys, you are correct. I would very much like to show X number of articles ON THE MAIN PAGE from many sections and paginate them to their own sections.
I want to have Recent News and Recent Blog Posts section on my main page, and have those paginated, so when people click “Next” or “Previous” is takes them to that section’s taxonomy and the relevent paginated page.
I hope I’m making sense.
For now, I’ve disabled one of the paginators, but would like to have it.
For example, on main page, have two paginators, and instead of going to /page/1, /page/2, etc, it will respectively go to:
/blog/page/1, and /blog/page/2
Is it anyway possible to have multiple configured paginators with PATH to different locations so they don’t confuse themselves?
I think I know what you mean, but I’m having trouble understanding why
Why not show a number of recent news and blog posts and give both sections a hardcoded “more news” and “more blog posts” link to the corresponding list under /news/ and /blog/? And of course, there you would have a pagination for those sections. You leave the main page anyway…