summaryrefslogtreecommitdiff
path: root/doc/plugin-hooks.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'doc/plugin-hooks.markdown')
-rw-r--r--doc/plugin-hooks.markdown8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/plugin-hooks.markdown b/doc/plugin-hooks.markdown
index 9a4bdab2..a700e34b 100644
--- a/doc/plugin-hooks.markdown
+++ b/doc/plugin-hooks.markdown
@@ -153,6 +153,14 @@ Example to add new content in the dashboard sidebar:
$this->template->hook->attach('template:dashboard:sidebar', 'myplugin:dashboard/sidebar');
```
+Example to attach a template with local variables:
+
+```php
+$this->template->hook->attach('template:dashboard:sidebar', 'myplugin:dashboard/sidebar', array(
+ 'variable' => 'foobar',
+));
+```
+
This call is usually defined in the `initialize()` method.
The first argument is name of the hook and the second argument is the template name.