Replies: 1 comment
-
So… I guess what I am missing here is the inferred conclusion of the docs statement: "Taxonomy routes are automatically created for you if the corresponding view exists." Okay, let's assume I do not create a What I am supposed to do then? Create a custom route for each Collection that redirect all Taxonomy stuff to this view? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have tried to explain my problem and seek help in Discord, but the rapid discussion format, and my inability to detail things plainly in English gave me no clear answer, despite the good people there trying to help me.
I have a fairly simple project / case: Several Collections, sharing one Taxonomy (assigned to the Collections), lets call it "categories".
- First question: How / Where am I supposed to put the Taxonomy views subdirectory?
I want to create simple listing of all the Entries with whatever tag assigned.
It is my understanding, per the docs and Jack's Laracast videos, that I should create a "categories" subdirectory in the Collection directory:
/resources/views/projets/categories/show.antlers.html
So… because I have several Collections, am I supposed to duplicate the "categories" subdirectory inside all the Collections directory?
/resources/views/projets/categories/show.antlers.html
/resources/views/imageries/categories/show.antlers.html
/resources/views/textes/categories/show.antlers.html
perhaps sharing a partial, given the template is supposed to end up the same?
- Second question: Difference between Global Term details and Collection Term details.
{{ categories }} {{ url }} {{ /categories }}
and that returns/uses the/{collection-url}/{taxonomy slug}/{term slug}
route => projets/categories/architecture{{taxonomy:categories }} {{url}} {{ /taxonomy:categories }}
right? But that returns the global route/{taxonomy-slug}/{term-slug}
=> /categories/architectureSo I duplicated the whole
categories
directory once more, at the root:resources/views/categories/show.antlers.html
So I ends up with either 404, or redundant/duplicates subdirectory, and different URL returning the same content.
I do not need both
projets/categories/architecture
and/categories/architecture
, but I do understand why the second one makes sense in the context of shared Taxonomy between Collections…Could somebody help me make sense of it? I think it is a pretty common vanilla case, the elegance and simplicity of Statamic seems to handle things way more complicated than that. And I struggle with this Taxonomy structure / routes on almost every project.
Thanks a lot in advance
Beta Was this translation helpful? Give feedback.
All reactions