Display entry taxonomy terms with Blade #6228
-
I've build plenty with Antlers but on this project I'm integrating Statamic into an existing Laravel site with Blade for the frontend. On the site homepage I have a simple reference to a collection:
This works great. The "article-card" blade component works great too at presenting the associated taxonomy term:
The problem occurs on the article post page. It's a simple template and is working fine in every other way. However, my category taxonomy terms are not displaying at all:
On the site homepage I can see that
whereas the call to
How do I get a TermCollection on the article's own page? p.s. not sure if this is actually Blade related, but it's not something I've noticed before so thought it might be. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Urgh, it's ok. I forgot to call categories from the $page variable! It works fine now:
|
Beta Was this translation helpful? Give feedback.
Urgh, it's ok. I forgot to call categories from the $page variable! It works fine now:
@foreach($page->categories as $category)