Venti 2

Documentation

Events

Events are why you're here. Events have their own Element Type Venti_Event and as such will return an Element Criteria Model when accessed.


{% set events = craft.venti.events() %}

{% for event in events %}
{% endfor %}

Event Model#


allDay

The event is an all day event.

{{ event.allDay }}

eid

Each events individual id.

{{ event.eid }}

endDate

Ending datetime of the event.

{{ event.startDate|date('M d, Y') }}

groupId

The id of the group this event is associated with.

{{ event.groupId }}

id

The event's element id. This will return the original event id not the individual event id.

{{ event.id }}

isrepeat

This event is a repeat event. numeric bool

locale

The locale the event was fetched in..

rRule

The events standard recurrence rule.

location

Returns an element criteria model of a Venti Location element type. Location Model

{{ event.location }}

registration

Returns the registration object. Provides you with the type of registration url and or embed code output.

{{ event.registration }}
{{ event.registration.type }}
{# url or embed #}
{{ event.registration.url }}
{# http://… #}
{{ event.registration.embed }}
{# iframe … with this you will want to use the raw twig filter #}

repeat

This event has repeat events. numeric bool

slug

The event's slug.

specificLocation

The event's specific location string.

{{ event.specificLocation }}

startDate

Beginning datetime of the event.

{{ event.startDate|date('M d, Y') }}

status

The entry’s status (‘live’ or ‘disabled’).

summary

Human readable repeat schedule Every Monday, Wednesday, Friday until 08/26/2027

{{ event.summary }}

title

This is the title of the event. (Easy enough)

{{ event.title }}

url

Each events url. The default detail page is located at /event/{slug}/{startDate|date('Y-m-d')}

{{ event.url }}

Event Methods#


getGroup()

Retrieves the group objec this event is associated with. Group Model

{{ event.getGroup() }}

getColor()

Retrieves the group's color in hexidecimal color format. Group Model

{{ event.getColor() }}

excludedDates()

Retrieves an array of all the excluded dates for this event's recurrence.

{{ event.excludedDates() }}

includedDates()

Retrieves an array of all the included dates for this event's recurrence.

{{ event.includedDates() }}

Event Element#

Because this returns an element criteria model you have access to the same methods as here Element Criteria Model.


between()

Between is a method to fetch events between two dates. This is different than using a restriction on startDate & endDate because this will return all recurrences between the two dates. Best used when generating calendar.

{% set events = craft.venti.events.between(date,date) %}