Hello -
I’m not using tags for additional navigation (as proposed in the “Tags” section of the documentation). I simply want to use multiple tags to describe a project and style them as separate items in an html list.
In the Kirby installation default theme, the tags are simply something like this:
<b>Tags:</b> <?php echo $page->tags() ?>
And when you add an additional tag to the above, it ends up rather sloppy (it adds a comma between the tags, without a space).
I would just like to know how to list each tag as a separate<li></li> (with no comma).
Hello, I am using checkbox selected categories, same as Kirby Portfolio project’s blueprint. Is there please a similar solution to also remove commas in case of multiple categories?
The solution is in fact the same as outline above, the categories from the checkboxes are saved in the content file as a comma separated string in the same way as when you use tags.
Hi texnixe and thank you for your response.
I don’t seem to make it work with my configuration, or maybe my code is very bad, but should I still use the $page even if it’s an element within a $project ?
Here is my actual snippet which is predictably not working…
Hi texnite, yes that’s exactly for the use of classes as filters as I’m making a portfolio using MixItUp.
Thanks again for your response, of course it had to be with the $tag variable in this case…! It did good removing the commas, now it did also remove spaces between the categories names…
Sorry my php approach is minimal, maybe there is something to do to keep those spaces between my classes?
Wow that implode method was just the thing! Thanks a lot for the great tip lukas
Thank you also texnixe, that super perfect method deserves some investigation
Thanks guys