Is it somehow possible to let page->render() use global variables?
I want to render subpages in a template, which works fine for some cases.
The problem:
In the template there is an include, depending on a variable, which is set in the header.
in the first head/ first template:
$mobile = true;
foreach($landingpage->children as $child) {
echo $pages->get($child->id)->render();
}
and in the template:
include_once("./header.php");
if ($isMobile) {include("./mobile.inc");}
but page->render() will (of course) not recognize the unknown $mobile variable.
is there a way to render the page with all its variables?
Best, Jan