I have a lot of pages that represent books. They have a taxonomy called “author” so I can list all the books by a specific author easily.
On the section page of books (/book/), I would like to list all the authors with the book titles, e.g.:
Author1 - Book1
Author1 - Book2
Author2 - Book3
Author3 - Book4
What I need is a sorted paginator (sorted by the author’s name and then by the book’s title). sort .Paginator.Pages "Params.authors" "asc" doesn’t seem to work, I have tried some other possibilities as well without success. How should one do this?
Thanks for the comment, but sadly the code does not work
I tried to play around with different parameters but nothing seems to change, the “initial order” is kept (.Paginator.Pages).
Sorry, but still no success. I am starting to think that it has something to do with the fact that authors is a taxonomy and the value of it is a list.
Note that authors -> szerzok because it is in Hungarian. (And I failed to make it “appear in links and html in Hungarian” but keep the variable names in English - Taxonomy terms page permalink - how to change it?)
String cast in case of a taxonomy that is a string slice results in an error (ToStringE in cast library) that is then swallowed in ToString (cast library, again). https://github.com/spf13/cast/blob/master/cast.go#L103
@zwbetz@bep may I kindly ask you to reply whether this is intended behaviour or am I wrong somewhere? What is the solution? Dropping usage of taxonomies in my case?