date-recur-default-formatter.html.twig in Recurring Dates Field 8
Default theme implementation to display a recurring dates field.
Available variables:
- date: A single date (for non-repeating fields).
- repeatrule: The human readable repeat rule.
- occurrences: The actual date occurrences.
1 theme call to date-recur-default-formatter.html.twig
- DateRecurDefaultFormatter::viewValue in src/
Plugin/ Field/ FieldFormatter/ DateRecurDefaultFormatter.php - Generate the output appropriate for one field item.
File
templates/date-recur-default-formatter.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a recurring dates field.
- *
- * Available variables:
- * - date: A single date (for non-repeating fields).
- * - repeatrule: The human readable repeat rule.
- * - occurrences: The actual date occurrences.
- *
- * @ingroup themeable
- */
- #}
- {% if date and not isRecurring %}
- <div class="date-recur-date">{{ date }}</div>
- {% endif %}
-
- {% if repeatrule %}
- <div class="date-recur-repeat-rule">{{ repeatrule }}</div>
- {% endif %}
-
- {% if occurrences|length > 0 %}
- <ul class="date-recur-occurrences {% if occurrences|length > 1 %} date-recur-multiple {% else %} date-recur-single {% endif %}">
- {% for item in occurrences %}
- <li>{{ item }}</li>
- {% endfor %}
- </ul>
- {% endif %}