a little question:
I am using split to generate a series of class in my templete.
The problem is with a tag consisting of more than one word.
one word tag: red, blue, yellow, ecc.
two words tag: light blue, warm gray, ecc.
To solve tihs problem I try to use escape() but doesn’t work with split I think.
My goal is: “light blue” become “lightblue” or “light-blue” automatically
<?php foreach($page->tags()->split(',') as $tag): ?> <?= $tag->escape() ?> <?php endforeach ?>
There is another field method can I use?