Jump to content

Custom Todos: Difference between revisions

From EventR Wiki
Samh (talk | contribs)
No edit summary
Samh (talk | contribs)
No edit summary
Line 47: Line 47:
== Date Variables ==
== Date Variables ==


Task labels support the <code>{{{EventDate}}}</code> variable, which is replaced with the event's start date displayed as day and month numbers (e.g., ''16/06'').
Task labels support the <code>{{EventDate}}</code> variable, which is replaced with the event's start date displayed as day and month numbers (e.g., ''16/06'').


=== Basic Usage ===
=== Basic Usage ===
Line 55: Line 55:
! Replaced With
! Replaced With
|-
|-
| <code>{{{EventDate}}}</code>
| <code>{{EventDate}}</code>
| Event start date (e.g., ''16/06'')
| Event start date (e.g., ''16/06'')
|}
|}
Line 67: Line 67:
! Replaced With
! Replaced With
|-
|-
| <code>{{{EventDate+1}}}</code>
| <code>{{EventDate+1}}</code>
| Event start date + 1 day
| Event start date + 1 day
|-
|-
| <code>{{{EventDate-1}}}</code>
| <code>{{EventDate-1}}</code>
| Event start date − 1 day
| Event start date − 1 day
|-
|-
| <code>{{{EventDate+3}}}</code>
| <code>{{EventDate+3}}</code>
| Event start date + 3 days
| Event start date + 3 days
|-
|-
| <code>{{{EventDate-2}}}</code>
| <code>{{EventDate-2}}</code>
| Event start date − 2 days
| Event start date − 2 days
|}
|}
Line 82: Line 82:
Whitespace inside the braces is tolerated:
Whitespace inside the braces is tolerated:


* <code>{{{ EventDate + 1 }}}</code> → same as <code>{{{EventDate+1}}}</code>
* <code>{{ EventDate + 1 }}</code> → same as <code>{{EventDate+1}}</code>
* <code>{{{EventDate- 2}}}</code> → same as <code>{{{EventDate-2}}}</code>
* <code>{{EventDate- 2}}</code> → same as <code>{{EventDate-2}}</code>


Unknown variables (anything other than ''EventDate'') are left as-is.
Unknown variables (anything other than ''EventDate'') are left as-is.

Revision as of 13:19, 17 June 2026

TODO Task Label Prefixes & Variables

TODO task labels support special prefixes and variables that control how tasks are rendered in the UI.

Prefixes

Prefixes are detected by examining the first character of the label after trimming leading whitespace.

. (Dot) – Inline/Child Tasks

Prefix a task label with . to make it an inline child of the preceding non-dot task. Child tasks are displayed in a grid row alongside their parent, creating a compact horizontal layout.

Behaviour:

  • The . prefix is stripped from the displayed label
  • The task is grouped with the previous non-dot task as a child
  • Displayed in a shared grid row (parent + children side by side)
  • Checkbox is still shown (can be checked/unchecked)
  • If a dot-prefixed task appears without a preceding parent, it is treated as a regular individual task

Example:

Monday Breakfast
.Lunch
.Dinner

| (Pipe) – Label-Only (No Checkbox)

Prefix a task label with | to render it as plain text without a checkbox. Useful for section headers, notes, or informational text within a todo list.

Behaviour:

  • The | prefix is stripped from the displayed label
  • No checkbox is rendered
  • The item does not count toward the completed/total counter

Example:

|Important Notes
Attend all morning sessions
|Evening Activities

Date Variables

Task labels support the Template:EventDate variable, which is replaced with the event's start date displayed as day and month numbers (e.g., 16/06).

Basic Usage

Variable Replaced With
Template:EventDate Event start date (e.g., 16/06)

Offsets

You can add or subtract days from the event date using + or -:

Variable Replaced With
Template:EventDate+1 Event start date + 1 day
Template:EventDate-1 Event start date − 1 day
Template:EventDate+3 Event start date + 3 days
Template:EventDate-2 Event start date − 2 days

Whitespace inside the braces is tolerated:

Unknown variables (anything other than EventDate) are left as-is.

Example:

{{EventDate}} Check-in at hotel
{{EventDate+1}} Follow-up meeting

Combining Prefixes and Variables

Prefixes and date variables can be used together:

|Schedule for {{EventDate}}
Morning briefing
. Afternoon workshop
. Evening networking