I swear, making an entire pseudo-project on Github just to ask a question is a nightmare… >.<
Anyway, I was reading about Headless Bundles as substitutes to Taxonomies and, on top of it, if I got it right, a way to get rid of the Data Files
After a lot of struggling with the concept, I managed to set-up a basic multilingual structure which I used in this demo repository. However, after implementing the “all-in” template for Taxonomies provided in the docs — which I really like to keep so I can build an entire search system from it — I noticed that all sections stopped working, “redirecting” me to the Taxonomy Terms template (/tags
).
After MUCH debugging and even a start over I noticed that the culprit was the Taxonomies’ definition in my config.yaml
. Taking as an example the Taxonomy Term actors, which would list all actors from all movies, I should be seeing a listing template but what I actually have is the Taxonomy Terms’ rendered again. If comment out that entry, everything works as expected and either /en/actors
or /pt/actors
now list the only two actors I’ve added as a demonstration (Tom Hanks and Tim Allen).
Can’t Taxonomy Terms coexist with Headless Bundles? If not, what could I do to have the same hierarchically rendered Taxonomy Terms (or close to, even if I have to code each block individually).
[EDIT]
While waiting for an answer, assuming it’s really not possible to have both Taxonomy Terms along with Headless Bundles (well, at least not when their names conflict) I tried to replicate the template from the docs manually in favour of the Headless Bundles and I almost got it right (I think).
It’s already updated on Github as well (template /taxonomy/single.html
in hello-friend-ng’s theme folder), of course, and, with it, if you access for example /en/taxonomy
(best name I could find >.<) you’ll see the entry Fake Actor created on purpose associated to both movies to the date, however, its headless bundle has been associated only in /content/<LANG>/titles/toy-story-2
, not the other one.
The obvious problem here is the inner-most {{ range }}
that doesn’t take into account any condition, but of the attempts I tried to make each of the movies to appear under each entry (e.g. movies each actor played a role, movies of each genre and etc) all failed.