aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/widget.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/widget.tpl')
-rw-r--r--view/tpl/widget.tpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/view/tpl/widget.tpl b/view/tpl/widget.tpl
new file mode 100644
index 000000000..4bbbb2df9
--- /dev/null
+++ b/view/tpl/widget.tpl
@@ -0,0 +1,12 @@
+{{* Generic template for widgets.
+ *
+ * To use this template, pass the `$this` object reference of the widget,
+ * and implement the `title()` and `contents()` functions as public methods
+ * on the widget class.
+ *}}
+<div class="widget">
+ {{if $widget->title()}}
+ <h3>{{$widget->title()}}</h3>
+ {{/if}}
+ {{$widget->contents()}}
+</div>