I think it's used to reference php stuff, but I'm not sure. I see some of it written like this in the html file:
{% if ban.reason %}
<p class="reason">
{{ ban.reason }}
</p>
{% endif %}
I think it's used to reference php stuff, but I'm not sure. I see some of it written like this in the html file:
{% if ban.reason %}
<p class="reason">
{{ ban.reason }}
</p>
{% endif %}
It's a Template Engine system, and its syntax is based on jinja. Another code example:
{% extends "layout.html" %}
{% block body %}
<ul>
{% for user in users %}
<li><a href="{{ user.url }}">{{ user.username }}</a></li>
{% endfor %}
</ul>
{% endblock %}
from wikipedia:
(end from wikipedia)
For example instead of writing such this:
<?php echo $var ?>
<?php echo htmlspecialchars($var, ENT_QUOTES, 'UTF-8') ?>
You can do this with Twig:
{{ var }}
{{ var|escape }}
And another example:
<ul id="navigation">
<?php if (navigation) { ?>
<?php foreach ($navigation as $item) { ?>
<li><a href="<?php echo $item->href; ?>"><?php echo $item->caption; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
In template engine:
<ul id="navigation">
{% for item in navigation %}
<li><a href="{{ item.href }}">{{ item.caption }}</a></li>
{% endfor %}
</ul>
It could be also Javascript Template like blueimp. Another code example:
<title>{%=o.title%}</title>
<h3><a href="{%=o.url%}">{%=o.title%}</a></h3>
<h4>Features</h4>
<ul>
{% for (var i=0; i<o.features.length; i++) { %}
<li>{%=o.features[i]%}</li>
{% } %}
</ul>
"o" (the lowercase letter) is a reference to the data parameter of the template function.
This syntax is used by a template engine that reads this file and generates the final HTML. Some of them may be Django or Smarty like @karthikr commented.