What is the best way to push data to a template in a multi-language setup?
site()->visit('some/page', 'en')
has no option to push data.
What is the best way to push data to a template in a multi-language setup?
site()->visit('some/page', 'en')
has no option to push data.
You can use $page->render()
: https://getkirby.com/docs/reference/objects/page/render
https://getkirby.com/docs/guide/templates/controllers#arguments-from-page-render-in-route
Thanks for your quick response. I know this option, but Iām not sure how to pass the current language to the controller.
This should actually do the job.
$page = page('some/page');
site()->visit($page, 'en');
return $page->render($data)
Mille Grazie!
Con piacere!