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

@ -139,7 +139,7 @@ function geonames_addon_settings(App $a, &$s)
/* Get the current state of our config variable */
$enabled = intval(DI::pConfig()->get(local_user(), 'geonames', 'enable'));
$t = Renderer::getMarkupTemplate('settings.tpl', __DIR__);
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/geonames/');
$s .= Renderer::replaceMacros($t, [
'$title' => DI::l10n()->t('Geonames Settings'),
'$description' => DI::l10n()->t('Replace numerical coordinates by the nearest populated location name in your posts.'),