Skip to main content

General Functions

This section includes functions related to tooltips, selection handling, and value matching.

addSimpleToolTip

Adds a simple tooltip element to an element.

Usage

{{ addSimpleToolTip("Tooltip") | raw }}

checkSelected

Checks if the selected element matches the given value. Returns selected if both arguments match (both must be strings).

Usage

{{ checkSelected('adventurer', 'adventurer') }}

match

Performs a PHP-style match operation in Twig.

Usage

{% set result = match('Something', {  
'Votes All Time':'all_time_voters',
'Recent Votes':'recent_votes',
'Votes This Month':'top_voters_this_month'
}) %}
{{ result }}