diff --git a/SeacmsAuth.php b/SeacmsAuth.php index 021851b..0da9695 100644 --- a/SeacmsAuth.php +++ b/SeacmsAuth.php @@ -35,4 +35,20 @@ class SeacmsAuth extends AbstractPicoPlugin implements ApiAware { return new JsonResponse(200,['connected'=>false]); } + + /** + * Triggered when Pico registers the twig template engine + * + * @see Pico::getTwig() + * + * @param Twig_Environment &$twig Twig instance + */ + public function onTwigRegistered(Twig_Environment &$twig) + { + $twigLoader = $twig->getLoader(); + $templateDir = $this->getPluginsDir().'SeacmsAuth/templates'; + if (is_dir($templateDir)){ + $twigLoader->addPath($templateDir, 'SeacmsAuth'); + } + } } diff --git a/templates/head-scripts.twig b/templates/head-scripts.twig new file mode 100644 index 0000000..7c76b04 --- /dev/null +++ b/templates/head-scripts.twig @@ -0,0 +1,5 @@ +{# SPDX-License-Identifier: EUPL-1.2 #} +{# Authors: see README.md #} + + + diff --git a/templates/head-styles.twig b/templates/head-styles.twig new file mode 100644 index 0000000..25d7dec --- /dev/null +++ b/templates/head-styles.twig @@ -0,0 +1,3 @@ +{# SPDX-License-Identifier: EUPL-1.2 #} +{# Authors: see README.md #} + \ No newline at end of file