I had problems with custom template path setting throwing error, because of file not found, as PW tries to use the default template path when rendering page. I fixed it with using TemplateFile() correctly, as you can actually render the TemplateFile you setup instead of the page, and it will render the template file.
So how does the template know what $page is? That's why I also added a template var "page" so the $page variable works in the code of template file.
$parsedTemplate->set("page", $p);
Also set for convenience a "isAdmin" variable to the template as it's less verbose.
$parsedTemplate->set("page", $p);
In template code:
if(isset($isAdmin)) ..
vs
if(isset($options['pageTableExtended'])) ...
I had problems with custom template path setting throwing error, because of file not found, as PW tries to use the default template path when rendering page. I fixed it with using TemplateFile() correctly, as you can actually render the TemplateFile you setup instead of the page, and it will render the template file.
So how does the template know what $page is? That's why I also added a template var "page" so the $page variable works in the code of template file.
Also set for convenience a "isAdmin" variable to the template as it's less verbose.
In template code:
I created a pull request here https://github.com/MadeMyDay/PageTableExtended/pull/15