educaweb2/shortcodes/email.tmpl~

26 lines
637 B
Cheetah

<%doc>
Return URL from email and some social networks.
Template engine: Mako
Usage:
{{% url <site> %}}
where <site> is one of 'email', 'xmpp', 'mastodon' or 'peertube', corresponding to GLOBAL_CONTEXT variable of EMAIL_URL, XMPP_URL, MASTODON_URL and PEERTUBE_URL respectively
Example: {{% url 'mastodon' }} will show the content of MASTODON_URL defined in GLOBAL_CONTEXT of config.py
</%doc>
% if _args[0] == 'email':
${EMAIL_URL}
% elif _args[0] == 'xmpp':
${XMPP_URL}
% elif _args[0] == 'mastodon':
${MASTODON_URL}
% elif _args[0] == 'peertube':
${PEERTUBE_URL}
% else:
Unknown
% endif