Skip to content

Walkthrough

github-actions[bot] edited this page Dec 4, 2026 · 2 revisions

Written against v0.1.0.

By the end of this page, a template lists upcoming PassCal events, each linked to its page on the calendar.

It assumes the add-on is installed (see Installation (README)) in a site that can reach the PassCal instance.

1. Add the tag to a template

{{ passcal:events max="5" }}
    <ul>
        {{ events }}
            <li><a href="{{ url | sanitize }}">{{ title | sanitize }}</a>: {{ date }} {{ date_time }}</li>
        {{ /events }}
    </ul>
    {{ if no_results }}<p>No upcoming events.</p>{{ /if }}
{{ /passcal:events }}

Load the page. It lists up to five upcoming events.

Note: print text from the calendar, such as title, location and url, through Statamic's sanitize modifier, as above. date holds markup around the year of an event in another year, so it is printed without the modifier.

2. Point at another PassCal instance, if needed

The default is https://calendar.uams.edu. To use another instance, set it in the site's .env:

PASSCAL_BASE_URL=https://calendar.example.test

Reload the page. The events now come from that instance.

Go further

Clone this wiki locally