Custom Todos: Difference between revisions
Blanked the page Tag: Blanking |
No edit summary |
||
| Line 1: | Line 1: | ||
= 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 <code>.</code> 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 <code>.</code> 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:''' | |||
<syntaxhighlight> | |||
Monday Breakfast | |||
.Lunch | |||
.Dinner | |||
</syntaxhighlight> | |||
=== <code>|</code> (Pipe) – Label-Only (No Checkbox) === | |||
Prefix a task label with <code>|</code> to render it as '''plain text without a checkbox'''. Useful for section headers, notes, or informational text within a todo list. | |||
'''Behaviour:''' | |||
* The <code>|</code> prefix is stripped from the displayed label | |||
* No checkbox is rendered | |||
* The item does not count toward the completed/total counter | |||
'''Example:''' | |||
<syntaxhighlight> | |||
|Important Notes | |||
Attend all morning sessions | |||
|Evening Activities | |||
</syntaxhighlight> | |||
== 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''). | |||
=== Basic Usage === | |||
{| class="wikitable" | |||
! Variable | |||
! Replaced With | |||
|- | |||
| <code>{{{EventDate}}}</code> | |||
| Event start date (e.g., ''16/06'') | |||
|} | |||
=== Offsets === | |||
You can add or subtract days from the event date using <code>+</code> or <code>-</code>: | |||
{| class="wikitable" | |||
! Variable | |||
! Replaced With | |||
|- | |||
| <code>{{{EventDate+1}}}</code> | |||
| Event start date + 1 day | |||
|- | |||
| <code>{{{EventDate-1}}}</code> | |||
| Event start date − 1 day | |||
|- | |||
| <code>{{{EventDate+3}}}</code> | |||
| Event start date + 3 days | |||
|- | |||
| <code>{{{EventDate-2}}}</code> | |||
| Event start date − 2 days | |||
|} | |||
Whitespace inside the braces is tolerated: | |||
* <code>{{{ EventDate + 1 }}}</code> → same as <code>{{{EventDate+1}}}</code> | |||
* <code>{{{EventDate- 2}}}</code> → same as <code>{{{EventDate-2}}}</code> | |||
Unknown variables (anything other than ''EventDate'') are left as-is. | |||
'''Example:''' | |||
<syntaxhighlight> | |||
{{EventDate}} Check-in at hotel | |||
{{EventDate+1}} Follow-up meeting | |||
</syntaxhighlight> | |||
== Combining Prefixes and Variables == | |||
Prefixes and date variables can be used together: | |||
<syntaxhighlight> | |||
|Schedule for {{EventDate}} | |||
Morning briefing | |||
. Afternoon workshop | |||
. Evening networking | |||
</syntaxhighlight> | |||