Hi! I’m pretty new to php/programming so this is probably basic but here goes…
I want each project page of mine to display the roles (“Categories”) they sit in.
I added this to my project.yml
category:
label: Category
type: checkboxes
options:
art direction: Art direction
branding: Branding
illustration: Illustration
publication: Publication
print: Print
web design: Web design
And I’m using this code to output each category:
<h4>
<?php echo implode(', ', array_map('ucfirst', $page->categories()->split(','))) ?>.
</h4>
But “Art direction” and “Web design” only show up as “Art” and “Web”. Am I using the correct variables? When I did a var dump on $page->categories() it came up with
Thanks!