I made a custom field method to convert autoids of related pages to their titles:
<?php
Kirby::plugin('my-project/autotitle', [
'fieldMethods' => [
'autotitle' => function ($field) {
$field->value = autoid($field)->title();
return $field;
}
]
]);
It works fine on the frontend and in page-blueprints but not in my blocks-blueprints:
fieldsets:
events:
label: "{{ event.autotitle }}"
fields:
event:
type: select
options: query
query:
fetch: site.find("events").children
text: "{{ page.title }}"
value: "{{ page.autoid }}"
somehow doesn’t return anything. Is this intended behaviour or am I doing it wrong?