I’m trying to create a menu of all the tags of the works in the page so the user could filter works by the tags.
Since some works have the same tags it shows some tags multiple times (depends on how many works have the same tag). is there a way to show all the tags without repeating them?
This is how I show them in the template right now:
<div class='all-tags'> <?php foreach ($page->children()->listed() as $work): ?> <?php foreach ($work->tags()->split() as $tag): ?> <div class='tag' ><?= $tag ?></div> <?php endforeach ?> <?php endforeach ?> </div>
Would appreciate any help