I’m working on an old Kirby 2 website and it’s my first time working with v2. I need to restructure some contents. It’s pretty much simple, I’ve a category page with subpages for each category containing the title, an image and some description text.
Then there’s a blog page with subpages for each post. Now I want to assign every post to a category (or multiple, but that’s not possible I’ve read).
But they don’t understand it. Now I have to look for a workaround to get this connected. Could do it statically but that’s not the route I wanna go down.
If that doesn’t work, I remember having a plugin in Kirby 2 that let you specify a PHP function to fetch any kind of options for a select field. That might work for you, too.
You’d need a plugin for yourself to load the function:
site/plugins/myplugin/myplugin.php:
<?php
class MyPlugin {
static function projectTags($field) {
$result = array();
$page = page('projecttags');
foreach ($page->children() as $tag) {
$result[$tag->uid()] = $tag->title();
}
return $result;
}
}