From 9ce99a0902c4f214fb3ab2f99d59d0dcc0b96776 Mon Sep 17 00:00:00 2001 From: edalzell Date: Wed, 15 Apr 2026 12:11:02 -0700 Subject: [PATCH 1/2] docs --- DOCUMENTATION.md | 16 ++++++++++------ UPGRADING.md | 31 ------------------------------- 2 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 UPGRADING.md diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index a2541f7..f4fe04a 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -1,6 +1,5 @@ Table Of Contents: -* [Upgrading](https://github.com/transformstudios/statamic-events/blob/master/UPGRADING.md) * [Configuration](#configuration) * [Fieldset](#fieldset) * [Fields](#fields) @@ -10,7 +9,7 @@ Table Of Contents: If you'd like to have a different event timezone default than the app default (usually UTC), update it via the CP. This is used on individual events that do not have a timezone set (see Fieldset below). -The default collection for your events is `events`, if you use a different one, publish the config file and then update it via the CP. +The default collection for your events is `events`, if you use a different one, update it in the addon settings. For the ICS downloads, it will use `address`, `coordinates`, and `description` fields if they exist. If your field is named something else, use a [Computed Value](https://statamic.dev/computed-values). `coordinates` must be a keyed array: ``` @@ -74,13 +73,18 @@ days: **Common Parameters** -All of the above (except Download Link) have a `site` parameter you can pass the handle of the site to get the events from. It defaults to your default site. **Note**: if you use Livewire you may need to set this from Antlers, using `{site:handle}` +All of the above (except Download Link) have : +* `site` - handle of the site to get the events from. It defaults to your default site. **Note**: if you use Livewire you may need to set this from Antlers, using `{site:handle}` +* `timezone` - all occurrences will be shifted to this timezone **Additional Variables** (normal entry data is available) -* `start` - Carbon date/time of the occurrence start -* `end` - Carbon date/time of the occurrence end. Note if it's an all date event this will be set to 11:59:59pm -* `has_end_time` - Boolean that indicates if this occurrence has a set end time. In All Day events, this is `false` +* `start` - Carbon date/time - occurrence start +* `end` - Carbon date/time - occurrence end. Note if it's an all date event this will be set to 11:59:59pm +* `has_end_time` - Boolean - `true` if occurrence has a set end time. In All Day events, this is `false` +* `spanning` - Boolean - `true` if occurrence spans multiple days +* `spanning_start` - Boolean - `true` if `spanning` and this is the first one +* `spanning_end` - Boolean - `true` if `spanning` and this is the last one * when it is a multi-day event, there is also an array of `days` that contains: * `start` * `end` diff --git a/UPGRADING.md b/UPGRADING.md deleted file mode 100644 index 37d12da..0000000 --- a/UPGRADING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Upgrading from V3 - -First, please make sure you read the full [documentation](https://github.com/transformstudios/statamic-events/blob/master/DOCUMENTATION.md). - -There are a few changes in v4 that require changes to your templates. - -## General -* Output of the tags are now full entries, so all normal entry variables are available. -* There is no `{{ dates }}` pair anymore, now data is returned just like the `collection` tag. So if you had: - -``` -{{ events:upcoming .... }} - {{ dates }} - .... - {{ /dates }} -{{ /events:upcoming }} -``` - -It would now look like: - -``` -{{ events:upcoming .... }} - .... -{{ /events:upcoming }} -``` - -* There is no special `{{ date }}` variable any more. Instead there is `{{ start }}` and `{{ end }}`. - -## Pagination -* Instead of `{{ ... paginate="true" limit="5" }}` you now do `{{ ... paginate="5" }}`, just like the `collection` tag. -* Output is now like the `collection` tag's output and has a `{{ results }}` variable pair and a `{{ paginate}}` pair From ea21393ec91dc2fc5fc20be80d292b0300c273f8 Mon Sep 17 00:00:00 2001 From: edalzell Date: Fri, 17 Apr 2026 12:05:19 -0700 Subject: [PATCH 2/2] wip --- DOCUMENTATION.md | 10 ++-- calendar.html | 141 ++++++++++++++++++++++++++--------------------- 2 files changed, 84 insertions(+), 67 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index f4fe04a..55bed0e 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -82,9 +82,6 @@ All of the above (except Download Link) have : * `start` - Carbon date/time - occurrence start * `end` - Carbon date/time - occurrence end. Note if it's an all date event this will be set to 11:59:59pm * `has_end_time` - Boolean - `true` if occurrence has a set end time. In All Day events, this is `false` -* `spanning` - Boolean - `true` if occurrence spans multiple days -* `spanning_start` - Boolean - `true` if `spanning` and this is the first one -* `spanning_end` - Boolean - `true` if `spanning` and this is the last one * when it is a multi-day event, there is also an array of `days` that contains: * `start` * `end` @@ -159,7 +156,12 @@ Parameters: Output: -A collection of dates, each one containing either `no_results` or `occurrences`, which list all the event occurrences on that particular date. +A collection of dates, each one containing either `no_results` or `occurrences`, which list all the event occurrences on that particular date. In each occurence, in addition to the usual variables there are: +* `spanning` - Boolean - `true` if occurrence spans multiple days +* `spanning_start` - Boolean - `true` if `spanning` and this is the first one in a span +* `spanning_end` - Boolean - `true` if `spanning` and this is the last one in a span + +Those can be used to style/handle occurrences that span days. *Example*: diff --git a/calendar.html b/calendar.html index b0f94fc..17879be 100644 --- a/calendar.html +++ b/calendar.html @@ -1,65 +1,80 @@ - -
-
-
-
-

Tap on a day to see the event(s)

- -
-
-
-
-
-
-
-
Sun
-
Mon
-
Tue
-
Wed
-
Thu
-
Fri
-
Sat
-
-
- {{ events:calendar collection="events" :year="get.year" :month="get.month" scope="outer" }} - {{ if date | is_start_of_week }}
{{ /if }} -
-
{{ date format="d" }}
- {{ unless no_results }} - - {{ /unless }} -
- {{ if date | is_end_of_week }}
{{ /if }} - {{ /events:calendar }} -
-
-
-
+
+
+
+
+

Tap on a day to see the event(s)

+ +
+
+
+
+
+
+
+ {{ events:days_of_week }} +
{{ medium }}
+ {{ /events:days_of_week }} +
+
+ {{ days = {events:calendar collection="events" :year="get.year" :month="get.month"} /}} -
-
- -
-
-
- -
+ {{ days scope="day" }} + {{ if date | is_start_of_week }}{{ /if }} + {{ /days }} +
+
+
+