Get taxonomy on collection's detail page? #5298
Replies: 2 comments 8 replies
-
If you do a {{ dump }} on the 'show' page you should see the variables available, one of which should be your taxonomy field. You can then loop over it {{ your_field_name }} .... {{ /your_field_name }} to see the terms attached to it. |
Beta Was this translation helpful? Give feedback.
-
@ryanmitchell Yes, that works. But now I want to check if a certain page has two different terms. So I have a taxonomy
But that does not exists, right? Do I need to write my own tag here to check the terms of a page? |
Beta Was this translation helpful? Give feedback.
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 there,
I have a collection "pages", within this collection I have an entry like "Installation Guide". This entry has a taxonomy "version" with the value "version5".
Now when I am on the detail page of this pages entry in the frontend I just want to check if the version's value is "version5" or "version6". So I am looking for something like
{{ has_version('version5') }}
or{{ has_taxonomy_value('version', 'version5') }}
or{{ taxonomy:version.title }}
to get the value. I also need to pass this value to antother route to filter the items. Is there a function for this?Beta Was this translation helpful? Give feedback.
All reactions