Enabling Growl Notifications
Using growl outside admin requires some magic to make it work.
Why
Growls provide an unobtrusive way of notifying users of background events or the completion of tasks. This guide provides step-by-step instructions on how to enable it for your site.
Assumptions
Readers are expected to be familiar with template editing.
How
Although the magic is quite simple. The missing pieces are a couple of client side scripts:
/lib/js/modules/z.notice.js and
/lib/css/zp-growl.css
The base.tpl file shipped with zotonic (0.6) doesn't make use of the _js_include.tpl file that other parts use. So either use that one, to get the z.notice.js included, or simply add it to the list of libs at the bottom of the base.tpl .
Something like this:
{% lib ... "js/modules/z.notice.js" ... %}
And the css is included near the top in base.tpl :
{% lib ... "css/zp-growl.css" ... %}
Now you should be able to use growl actions in your templates, example:
{% button action={growl text="hello world"} %}
Growl is documented here: http://zotonic.com/action-growl
Troubleshooting
There are no troubleshooting steps available for this guide. Please provide any you have learned in the comments below or on the Zotonic Users Group.
This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.