Hi,
I’m following this tutorial to create some virtual pages from my database. I’m generating a uuid so I was expecting Kirby not to generate content folders, but somehow it is.
Am I missing something here?
<?php
use Kirby\Uuid\Uuid;
class OrdersPage extends Kirby\Cms\Page
{
public function children(): Pages
{
if ($this->children instanceof Pages) {
return $this->children;
}
$orders = [];
foreach (Db::select('orders') as $order) {
$orders[] = [
'slug' => $order->orderid(),
'template' => 'order',
'model' => 'order',
'content' => [
'orderid' => $order->orderid(),
'uuid' => Uuid::generate(),
]
];
}
return $this->children = Pages::factory($orders, $this);
}
}