- How do I install the Statamic Calendar Links addon with Composer?
- Install it from your project root with composer require darinlarimore/statamic-calendar-links. Because it is a Statamic addon, the service provider is registered automatically through Laravel package discovery, so no manual provider entry is normally needed. After installing, publish the addon's config file if you want to adjust the field mapping, then clear Statamic's caches with php please cache:clear. Commit your composer.json and composer.lock changes so other environments pick up the same version.
- Which Statamic and Laravel versions does this addon support?
- The addon targets Statamic sites, which run on Laravel, so your PHP and Laravel versions need to satisfy both Statamic's own constraints and the addon's. Check the require block in the package's composer.json for the exact PHP, Laravel, and statamic/cms version ranges before installing. If you are on an older Statamic major, test on a staging copy first, because Antlers tag registration and config publishing behaviour differs between majors. Pin the addon version in composer.json if you need a stable, auditable deployment baseline.
- How do I map entry fields to the event title, start date, end date, location, and description?
- Field mapping is handled through the addon's configuration, where you point each event attribute such as title, start, end, location, and description at the corresponding field handle on your entry. This means your existing event collection keeps its current fieldset and you do not duplicate data or build custom templates. If your site uses multiple event collections with different field handles, define the mapping that matches each context rather than forcing a single global schema. Keep the config in version control so mapping changes are reviewed like code.
- What does the Antlers tag look like in a Statamic template?
- You render the links by placing the addon's Antlers tag inside your entry loop, typically within an events collection template or a partial. The tag returns the generated add-to-calendar URLs so you can drop them straight into an anchor href or pass them to a button component. Because the output is framework-agnostic, you control the markup and classes around the URL rather than inheriting opinionated HTML. Refer to the package README for the exact tag handle and available parameters for your version.
- Does the addon support all-day events and events spanning multiple days?
- Yes, the addon handles both all-day events and events that run across multiple days. All-day events are encoded as date-only values in the calendar payload so Google Calendar and .ics consumers do not shift them into a timed slot. Multi-day events use the start and end fields together, so make sure both are populated and consistently ordered in your fieldset. Always test a multi-day, cross-timezone event against a real calendar client before launch.
- How are timezones handled when generating calendar links?
- The addon applies timezone handling to the generated event data so times are interpreted correctly in the visitor's calendar application. The safest setup is to store event times with an explicit timezone, either from a dedicated entry field or a configured site default, rather than relying on an implicit server timezone. If your site serves visitors in several regions, verify that a UTC-stored date renders as the intended local time in Google Calendar and in a downloaded .ics file. Timezone drift is the most common cause of off-by-one-hour event complaints.
- Can visitors add events to Apple Calendar and Outlook, or only Google Calendar?
- Out of the box the addon generates Google Calendar links and downloadable .ics files. The .ics route is what covers Apple Calendar, Outlook, and any other iCal-compatible application, since those clients import a standard calendar file rather than following a provider-specific URL. Google Calendar can use either the direct link or the .ics download depending on your template. Offer both options in your markup so visitors are not forced into a single provider.
- Can I style the calendar links as my own buttons instead of using default markup?
- Yes. The addon returns URLs rather than a fixed widget, so you write the anchor tags, icons, and button styles yourself using your existing Tailwind or CSS setup. Many sites render a primary Google Calendar button plus a secondary download option for Apple and Outlook users. Keep accessibility in mind by labelling each link with the provider name and indicating when a link triggers a file download.
- How should I test the generated add-to-calendar links before going live?
- Start by clicking a Google Calendar link from a staging URL and confirming the title, start, end, location, and description all arrive as expected. Then download an .ics file and import it into Apple Calendar or Outlook, checking that all-day and multi-day events land on the correct dates. Test at least one event in a different timezone from your server, and test an entry with a missing optional field such as location to confirm the output degrades gracefully. If your templates cache rendered entries, clear that cache after changing field mappings.
- Is the addon actively maintained, and what are the alternatives?
- Check the repository's recent commits, tagged releases, and open issues before committing to it, since small single-maintainer addons can go quiet between Statamic majors. The practical alternatives are hand-rolled Google Calendar template URLs plus a custom .ics route, or a general Laravel iCal package such as spatie/icalendar-generator wired up yourself. This addon mainly saves you the field-mapping and payload-building work, so its value is highest on sites with several event collections. Whatever you choose, pin the version and keep a fork path open in case Statamic support lags.