Hello!
When passing VirtualPages to a PagesField Kirby will not store any value in the content file the field belongs to.
A collection of VirtualPages is passed to to the field by a custom site method. This happens within a multilanguage installation.
# Page Blueprint with the pages field
fields:
virtualPagesselect:
type: pages
query: site.virtualPagesCollection
// site/plugins/virtualpages/index.php
Kirby::plugin('namespace/virtualpages', [
'siteMethods' => [
'virtualPagesCollection' => fn () => Pages::factory([
[
'slug' => 'virtual-slug',
'template' => 'virtual',
'parent' => kirby()->site(),
'model' => 'virtual-page',
'translations' => [
'de' => [
'code' => 'de',
'content' => [
'uuid' => 'virtual-id',
'title' => 'VirtualPage',
],
],
'en' => [
'code' => 'en',
'content' => [
'title' => 'VirtualPage',
],
],
]
]
]),
],
]);
I’ve cleared the UUID cache before each test and can see that, when the pages field request the virtual collection, the uuid cache folder is populated the virtual page uuids.