wiki-grav/plugins/form/templates/forms/fields/display/display.html.twig
2022-04-24 14:32:58 +02:00

22 lines
626 B
Twig

{% extends "forms/field.html.twig" %}
{% if field.file %}
{% set content = read_file(field.file) %}
{% else %}
{% set content = field.content %}
{% endif %}
{% block input %}
<div class="form-display-wrapper {{ field.size }} {{ field.classes }}" {% if field.id is defined %}id="{{ field.id|e }}" {% endif %}>
{% if field.markdown %}
{{ content|t|markdown|raw }}
{% else %}
{% if field.evaluate %}
{{ evaluate_twig(content)|raw }}
{% else %}
{{ content|t|raw }}
{% endif %}
{% endif %}
</div>
{% endblock %}