Template Engine with Subdirectory

- Use explicit root path for template engine
- Replace "__DIR__" calls in addons with subdirectories
- Fixes local tests, where call is made out of '/' and not '/vagrant/'
This commit is contained in:
Philipp 2020-04-26 15:45:25 +02:00
parent 81dd8fb295
commit 6520bd77d9
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
4 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ function pageheader_addon_admin(App &$a, &$s)
if(! $words)
$words = '';
$t = Renderer::getMarkupTemplate('admin.tpl', __DIR__);
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/pageheader');
$s .= Renderer::replaceMacros($t, [
'$title' => DI::l10n()->t('"pageheader" Settings'),
'$phwords' => ['pageheader-words', DI::l10n()->t('Message'), $words, DI::l10n()->t('Message to display on every page on this server (or put a pageheader.html file in your docroot)')],