Does anyone know if there's a trick to include a PW header & footer into another PHP script?
I would like to have the same header and footer on an old ordering system as I have on the main website programmed in PW.
I've tried to make a header page, that simply shows the header of the website, but I cannot include('path/to/headerpage') in my other PHP script??
This works:
// Include ProcessWire
require("../index.php");
// Get header
$header_page = wire()->pages->get("/external_head/");
echo $header_page->url;
This does not work for me:
// Include ProcessWire
require("../index.php");
// Get header
$header_page = wire()->pages->get("/external_head/");
include($header_page->url);