calendar-item.html.twig in Calendar 8
Template to display view fields as a calendar item.
- item A result object for this calendar item. Note this is not a complete entity. It will contain various values as added by the row plugin, which may depend on the entity type.
- rendered_fields An array of the rendered html for the fields in the item, as generated by Views. This does not include excluded fields and should take into account any special processing added in the field settings.
Calendar info for this individual calendar item is in local time -- the user timezone where configurable timezones are allowed and set, otherwise the site timezone. If this item has extends over more than one day, it has been broken apart into separate items for each calendar date and calendar_start will be no earlier than the start of the current day and calendar_end will be no later than the end of the current day.
- calendar_start - A formatted datetime start date for this item. i.e. '2008-05-12 05:26:15'.
- calendar_end - A formatted datetime end date for this item, the same as the start date except for fields that have from/to fields defined, like Date module dates.
- calendar_start_date - a PHP date object for the start time.
- calendar_end_date - a PHP date object for the end time.
See also
template_preprocess_calendar_item.
2 theme calls to calendar-item.html.twig
- Calendar::calendarBuildWeekDay in src/
Plugin/ views/ style/ Calendar.php - Fill in the selected day info into the event buckets.
- template_preprocess_calendar_day in ./
calendar.theme.inc - Display a day view.
File
templates/calendar-item.html.twigView source
- {#
- /**
- * @file
- * Template to display view fields as a calendar item.
- *
- * - item
- * A result object for this calendar item. Note this is
- * not a complete entity. It will contain various
- * values as added by the row plugin, which may depend
- * on the entity type.
- *
- * - rendered_fields
- * An array of the rendered html for the fields in the item,
- * as generated by Views. This does not include excluded
- * fields and should take into account any special processing
- * added in the field settings.
- *
- * Calendar info for this individual calendar item is in local time --
- * the user timezone where configurable timezones are allowed and set,
- * otherwise the site timezone. If this item has extends over more than
- * one day, it has been broken apart into separate items for each calendar
- * date and calendar_start will be no earlier than the start of
- * the current day and calendar_end will be no later than the end
- * of the current day.
- *
- * - calendar_start - A formatted datetime start date for this item.
- * i.e. '2008-05-12 05:26:15'.
- * - calendar_end - A formatted datetime end date for this item,
- * the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
- * - calendar_start_date - a PHP date object for the start time.
- * - calendar_end_date - a PHP date object for the end time.
- *
- * @see template_preprocess_calendar_item.
- */
- #}
- <div class="{{ item.class|default('item') }}">
- <div class="view-item">
- <div class="calendar {{ item.granularity }}view">
- {{ item | calendar_stripe }}
- <div class="{{ item.date_id }} contents">
- {% for field in rendered_fields %}
- {% if (index + 1) == 0 and item.continuation %}
- <div class="continuation">«</div>
- {% endif %}
- {% for field_html in field %}
- {{ field_html }}
- {% endfor %}
- {% endfor %}
- </div>
- {% if item.continues %}
- <div class="continues">»</div>
- {% else %}
- <div class="cutoff"> </div>
- {% endif %}
- </div>
- </div>
- </div>