I’d like to display a snippet outside of Kirby’s templates in the header of PHP forum software which resides in a subdirectory on the server (Kirby in the root).
Here’s what I’ve got so far;
define('DS', DIRECTORY_SEPARATOR); require(__DIR__ . DS . '../kirby' . DS . 'bootstrap.php'); $kirby = kirby(); $kirby->urls->index = 'https://' . $_SERVER['SERVER_NAME']; $kirby->launch(); snippet('header');
Unfortunately, this immediately shows an error when the snippet tries to display “$site->title()”. I’m assuming this is because it can’t find the site content or the base path of Kirby might be the subdirectory of the forum instead of the server root?
Just for clarification;
Kirby is in the root of the server, the forum software in /forums/.