I have a section
books containing page bundles for several books. Each
index.md file contains a slice-valued parameter
author whose values are, obviously, the names of the book’s author(s).
author = author is listed in the
taxonomies section. And no, I do not want to “pluralize” that – my language is not English, the site is not in English, so appending an “s” makes utterly no sense. I’m better off with the singular form.
What would be the names/locations of the
single equivalents for the authors? I’m overwhelmed by the list in
template lookup order
That was stupid – I’m looking for two list templates, one for all authors and one for a single author, listing all their books.
What I’d like to see happening:
- one “
list” template gives me a list of all authors
- the other “
list” template gives me a list of books for this particular author
I’m able to code that stuff, I’m just completely baffled by the required naming.
What is the name of the field in your front matter?
Have you tried authors = author
In the front matter, it’s “author”. And no, I do not want to use “authors = author”. Just imagine that the category name is not English and that appending an “s” to it makes utterly no sense. All I want to know is
What are the names for single and list templates in
Update I think I know why I’m confused. In the documentation, the same path to
layouts/category/list.html appears twice
Taxonomy list for "categories"(number 16)
Term list for "categories"(number 32)
Now, what happens if I have
layouts/category/list.html – will it be used for the
taxonomy list or for the
term list or for both?
And I have to amend my first post, because a “single” template doesn’t make sense for a
Figured it out:
list.html for the taxonomy list, i.e. the list of
term.html for the term list, i.e. the list of books by an author
does the trick.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.