I can’t find any guides which explain how exactly terms work and how I can paginate them. While I am asking I would like to do something like {{if eq .Title “Tags”}} order by most popular {{ else }} order by alphabetical. but just figuring out how to be paginated would be super great.
What I want to do is paginate my list of all terms/taxonomies on my site.
I have that for my list.html template, listing all posts within a taxonomy, but for my terms.html template I need to list all my taxonomies. I don’t think your code does that.
No example on this page uses similar formatting to what you have, which is why I just want to make sure we are on the same page before running it https://gohugo.io/templates/taxonomy-templates/
This is all fair I realize I sounded like a jerk, I should have just put together some sample data and ran it with that and checked it out (as generating this with all my pages is a 3+ hour endeavour) but it just looked so different than everything I have ever seen, and because of his wording I was skeptical we were on the same page so I thought I would just ask. I didn’t mean to look a gift horse in the mouth or anything like that, though I know that’s how it looks now
So I tried this code, and it didn’t work (I did also try this code on a page that lists a specific taxonomies posts and it did work, so this does list posts instead of taxonomies), I’m sorry if there was a miscommunication, but I am trying to do pagination on the list of terms not the list of posts with those terms.
No miscommunication, I understand exactly what you want to do. If you could tell me what “did not work” or point me to the failing source, I may be able to help you.
Also saying “it didn’t work” is a terrible way of saying something, I constantly am frustrated by my users saying the same thing and giving me nothing to go on.
Pagination only work for Pages (i.e. list of Page) or PageGroup (i.e. what you get from GroupBy...) or WeightedPages (i.e. a single taxonomy).
Since Hugo 0.2* something (don’t remember which), what you get in .Data.Pages (and this is used by default in the .Paginator) for a terms page is Pages that represents a list of taxonomy terms.
So, assuming you have a relatively updated Hugo version and have put the template in the right place etc., it should just work. If not, it is a bug.