Hej,
for a client project, I’d like to provide multiple (virtual) pages for a single real page with a different template in Kirby’s content folder. I also want the template to access an extra data variable from the route. I’m trying to realise a sign up page (virtual page that only uses content from real page) for an event (real page).
For the real page, I have a custom route in the config file and render it using something like this:
return page($slug)->render([
'date' => $date->format('Y-m-d')
]);
How do I now render the exact same page with a different route, accessing the same content and page model, just with a different template and controller? Should I use Page::factory()
to create a new page and provide just access to the content variable? Or should I set my real page as parent (as the virtual page is basically a child of such)?
Any advice is appreciated.