/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 - 2015 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ {% extends "index.html" %} {% block content %}

Fundamentals

Array Form

Some widgets may have an array as a parameter. Use [ ... , ... ] to define it. An array is only needed if you have more than one object.
Example
... ['bath_plot1', 'bath_plot2', 'bath_plot3'] ... -> 3 items as an array
... 'bath_plot1' ... -> only one item, no array needed

Duration Format

Some widgets require a parameter for duration or period. This is specified with the following letters:
s (second), i (minute), h (hour), d (day), w (week), m (month, 30 days), y (year, 365 days)
Example
... '10i 30s' ... -> 10 minutes + 30 seconds
... '2w' ... -> 2 weeks

Anchor Links in html Code

Links with normal html anchors will not work in smartVISU. Therefore, an alternative anchor representation is provided. Just append "&anchor=myAnchor" to the page URI in a link instead of "#myAnchor". This can be used with link and target on the same page as well as across pages.
Example
{% filter trim|escape|nl2br %}{% verbatim %} // the link to a target Link ... ... // the target
...
{% endverbatim %}{% endfilter %}

Check if Asset exists

SmartVISU provides a Twig function to check if an asset (image, widget HTML, etc.) exists. That is especially important for widgets that might be imported from the dropins folder.
Example
{% filter trim|escape|nl2br %}{% verbatim %} {% if asset_exists('stateengine.html') %} {% import "widgets/stateengine.html" as stateengine %} {% endif %} {% endverbatim %}{% endfilter %}

More Information

More information can be found on the wiki pages.
Please contribute there if you like to share your knowledge. We'll integrate the contents into this inline documentation later.
{% endblock %}