Skip to content
Snippets Groups Projects
Commit 2840d231 authored by Guy Halse's avatar Guy Halse
Browse files

Document __parent__ namespace for Twig

parent fda4288a
No related branches found
No related tags found
No related merge requests found
...@@ -131,7 +131,7 @@ If you need to make more extensive customizations to the base template, you shou ...@@ -131,7 +131,7 @@ If you need to make more extensive customizations to the base template, you shou
Any references to `$this->data['baseurlpath']` in old-style templates can be replaced with `{{baseurlpath}}` in Twig templates. Likewise, references to `\SimpleSAML\Module::getModuleURL()` can be replaced with `{{baseurlpath}}module.php/mymodule/...` Any references to `$this->data['baseurlpath']` in old-style templates can be replaced with `{{baseurlpath}}` in Twig templates. Likewise, references to `\SimpleSAML\Module::getModuleURL()` can be replaced with `{{baseurlpath}}module.php/mymodule/...`
Within templates each module is defined as a separate namespace matching the module name. This allows one template to reference templates from other modules using Twig's `@namespace_name/template_path` notation. For instance, a template in `mymodule` can include the widget template from the `yourmodule` module using the notation `@yourmodule/widget.twig`. Within templates each module is defined as a separate namespace matching the module name. This allows one template to reference templates from other modules using Twig's `@namespace_name/template_path` notation. For instance, a template in `mymodule` can include the widget template from the `yourmodule` module using the notation `@yourmodule/widget.twig`. A special namespace, `__parent__`, exists to allow theme developers to more easily extend a module's stock template.
Even more advanced changes can be made by defining a theme controller in `config.php`: Even more advanced changes can be made by defining a theme controller in `config.php`:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment