Skip to content

Twig filters

This plugin provides the following filters for use in Twig templates:

dateRange

Formats a Recurrence or similar object with a start and end dates as a range of dates. See DateHelper::formatDateRange()

This filter works great with the Date Range field!

{{ entry.dates|dateRange }}
{# Output: TODO #}

datetimeRange

Formats a Recurrence or similar object with a start and end dates as a range of dates and times. See DateHelper::formatDateRange()

This filter works great with the Date Range field!

{{ entry.dates|datetimeRange }}
{# Output: TODO #}

eventDate

Formats a Recurrence. See EventDateHelper::formatDate()

{{ recurrence|eventDate }}
{# Output: TODO #}

eventDateRange

Formats the value of an EventDate field. See EventDateHelper::formatDateRange()

{{ entry.date|eventDateRange }}
{# Output: TODO #}

eventTitle

Renders an event title using the configured template. See EventRenderer

eventDescription

Renders an event description using the configured template. See EventRenderer

eventLocation

Renders an event location using the configured template. See EventRenderer