Hello there, I’m an absolute newbie with Kirby 2 (or PHP for that matter). I’m trying to do the following but have no idea how to proceed: I have a “Projects” page where I’d like to have two lists, one with links to projects tagged with “tag1” and another with links to projects tagged with “tag2”. That’s probably not very hard to do but I’d be grateful for some help
Thanks in advance!
<?php foreach ($projectsWithTag1 as $project): ?>
<!-- HTML for list 1 -->
<?php endforeach ?>
Same for the second list.
There are other ways to achieve that, e.g. using groupBy()(with a field that has only one value) or group (for more complex stuff and if the field contains more than one value, e.g comma separated list of tags): http://k2.getkirby.com/docs/cookbook/sorting-and-grouping