So as per https://twitter.com/...397667160604672 I wanted to set up PW to manage content inside another web app and I'm doing something similar:
require(__DIR__ . '/index.php'); // this is the ProcessWire index file for bootstrap
echo $wire->pages->get('/videos')->setOutputFormatting(true)->render();
echo "\n\n\n\n\n==============================\n\n\n\n\n\n";
echo $wire->pages->get('/people')->setOutputFormatting(true)->render();
The problem here is that the first page (videos) renders fine, but the second one (people) does not. Specifically, $page seems to be undefined in the template for "people".
If I reverse the order (first render "people", then "videos") then again, the first one renders fine, but the second does not. So I get "people" correctly, but "videos" is stunted because $page is NULL in the template.
Any ideas?