The Perch Events App uses the namespace
|category.html||An event category|
|calendar/calendar.html||Calendar grid: The encapsulating grid structure and navigation|
|calendar/blank-day.html||Calendar grid: an empty day cell with no events|
|calendar/event-day.html||Calendar grid: a day cell with events|
|listing/calendar.html||Calendar listing: The encapsulating list structure and navigation|
|listing/blank-day.html||Calendar listing: an empty day with no events (not shown by default)|
|listing/event-day.html||Calendar listing: a day with events|
The different types of templates have different fields supplied with them. These can typically be customised, with new fields easily added to the appropriate master template. By default, the following IDs are specified in the default templates supplied with the add-on.
||The title of the event|
||A URL-safe slug for the event|
||The date and time at which the event occurs|
||The HTML description of the event|
||A string of category names applied to the event|
||A string of category slugs applied to the event|
||The URL of the event detail page (based on the path in Settings)|
The above event IDs should be available, along with:
||The grid heading columns|
||The grid body cells|
||The month the calendar is showing events for|
||The month previous to the one being displayed|
||The month following the one being displayed|
||The current month right now as the calendar is being viewed|
||Inside a day cell: the day|
The default templates are stored inside the
perch_events/templates folder however you should not edit these directly.
To modify templates copy the templates from
/perch/templates/events and then make your changes.
If a template has the same name in this folder as the template in the
perch_events folder it will be used rather than the default. You can also create your own templates with any name you like and pass in the name of the template in the function’s options array.
Adding fields to use in other templates
By default any field you add to the
event.html template will appear on the page. If you just want to add a field so that it appears in admin
and may be used by another template then add the variable
suppress to the field. It will then appear in admin to be completed by the user but not display when
event.html is used.