To compile strings with event information, DPCalendar uses a template engine called mustache.
It works by expanding tags in a template using values provided in a hash or object. Statement from http://mustache.github.com/mustache.5.html
The idea is that mustache should simplify the output customization in your Joomla calendar for non PHP developers. This syntax is mostly used in language strings for notifications or the content plugin.
On most language strings which do need some event data the mustache codes are used. Basically the {{parameter}} describes a variable passed to the output. {{#start_list}} is the beginning of an iteration over a list where the {{/start_list}} tag is the end of it. Mustache ensures the variables are HTML escaped. If you want to render it as it should be , use three mustaches like {{{parameter}}}
More mustache information can be found here.
Here is an example of a DPCalendar output:
{{#events}}<p>{{date}}<br/>{{{description}}}<br/>We are at: {{#location}}{{country}}, {{city}}{{/location}}</p>{{/events}}
will be rendered as
<p>19.02.2012<br/>Example description with <b>HTML</b>content</br>We are at: USA, New York</p>?
DPCalendar provides a wide range of variables which can be used in a mustache ready text. The text must be started with {{#events}} and end with {{/events}} even when it is only one single event. Here is the list of the available variables which are passed together with the output text to the mustache engine:
Comments (0)