Creating and Using Templates

Template Placeholders and Text Actions

Text Actions in Agenda allows you to type short commands that upon completion get dynamically converted and expanded into plain text. Think about it as a quick way to trigger an action like typing \remind to insert a reminder or \date to insert the current date.

Text Actions work in both normal notes and templates. In addition, Agenda also supports a set of template-specific Text Actions, a kind of special placeholders in your templates that get replaced when a new note is created from a template.

Many of these actions can take so called parameters inside parenthesis (similar to how you can add value parameters to tags), to further refine the behaviour of these actions. For example, \date(in: 2 weeks) inserts the date two weeks from now instead of the current date.

Below you’ll find a complete overview of the Text Actions that Agenda currently supports inside templates.

Tip: An even wider range of Text Actions are supported in regular notes, see Text Actions Cheat Sheet

Supported Text Actions

\date

  • action: inserts the current date into the note title or text:
    Parameters
  • parameters: full, long, medium, short - a standard date format in the given form
  • parameter: format - a custom formatted date, see tip and note below
  • parameter: locale - the locale to use for formatting the date
  • parameter: timezone - the timezone to use for formatting the date
  • parameter: in / for / offset - a different date than today - New in version 11.2
    Examples
  • \date(full) - Wednesday, July 22, 2020
  • \date(short) - 7/22/20
  • \date(format: dd-MM-yy) - 22-07-20
  • \date(full, locale: no) - onsdag 22. juli 2020
    New in version 11.2:
  • \date(for: tomorrow) - 23-07-20
  • \date(in: 2 days) - 24-07-20
  • \date(offset: 3 weeks) - 12-08-20

Tip: For a complete overview of supported date formats, see UTS #35: Unicode LDML: Dates. As an example: \date(EEE\, MMM d\, ''yy) will result in Wed, Jul 22, '20. Note how the comma’s in the pattern need to be escaped with a slash or it is seen as a next parameter. The same is true for colons, like in this example: \time(format: HH\:MM), resulting in 18:34.

Important: When a format is provided as a parameter, either a custom one or the full, long, medium, short ones, it also becomes the default format when you omit the parameter by just typing \date. To restore the format back to medium, you can type \date(default) once.

\time

  • action: inserts the current time into the note title or text:
    Parameters
  • parameters: full, long, medium, short - a standard time format in the given form
  • parameter: format - a custom formatted time, see tip and note above
  • parameter: locale - the locale to use for formatting the date
  • parameter: timezone - the timezone to use for formatting the date
    Examples
  • \time(full) - 12:27:15 PM Western European Summer Time
  • \time(short) - 12:27
  • \time(format: HH\:mm\:ss) - 12:27:33
  • \time(medium, locale: en_US_POSIX) - 12:27:15 PM

Tip: For a complete list of locale’s see iOS Locale Identifiers · GitHub, for a list of timezone identifiers, see iOS Time Zone list - Readdle Knowledge Base

\now

  • action: inserts the current date and time into the note title or text:
    Parameters
  • parameters: full, long, medium, short - a standard time format in the given form
  • parameter: format - a custom formatted date and time, see tip and note above
  • parameter: locale - the locale to use for formatting the date
  • parameter: timezone - the timezone to use for formatting the date
    Examples
  • \now(full) - Wednesday, July 22, 2020 at 2:29:53 AM Western European Summer Time
  • \now(short) - 7/22/20, 2:30 AM
  • \now(format: dd-MM-yy HH\:mm\:ss) - 22-07-20 02:30:30
  • \now(medium, locale: en_US_POSIX) - Jul 22, 2020 at 2:31:03 AM

Supported Template Placeholders

The following placeholders only work within templates and are added in the template manager. Upon creating a new note from a template they are replaced by the corresponding values.

\event-title

  • action: inserts the title of the calendar event linked to the note:
    Parameters
  • parameters: none
    Examples
  • \event-title - Team Meeting

\event-date

  • action: inserts the date of the calendar event linked to the note:
    Parameters
  • parameter: full, long, medium, short, custom format) a description of start and end date of the event
  • parameter: start (full, long, medium, short, custom format) the start date of the event, optionally in the given format
  • parameter: end (full, long, medium, short, custom format) the end date of the event, optionally in the given format
  • parameter: duration - the duration of the event
    Examples
  • \event-date(full) - Wednesday, July 22, 2020 (all-day event)
  • \event-date(start) - Jul 22, 2020 at 9:30:03 AM
  • \event-date(start: short) - 7/22/20, 9:30 AM
  • \event-date(end: dd-MM-yy) - 22-07-20
  • \event-date(duration) - 45 minutes

\event-notes

  • action: inserts the notes made in the calendar for the event linked to the note:
    Parameters
  • parameters: none - the notes in the same format as when manually linking
  • parameter: url - the url assigned to the calendar event, if any
  • parameter: location - the location assigned to the calendar event, if any
  • parameter: status - whether the meeting is confirmed, tentative etc
  • parameter: organizer - the name of the organizer of the event, if any
  • parameter: attendees / invitees - the names of the invitees or attendees of the event, if any
  • parameter: all - all textual notes of the event, including conference call details etc
    Examples
  • \event-notes - Standard set of notes, similar as to manual linking
  • \event-notes(url) - www.hightea-inc.com
  • \event-notes(location) - Kathmandu, Nepal
  • \event-notes(status) - Tentative
  • \event-notes(organizer) - Tom
  • \event-notes(attendees) - Christian, Janice

Important: To have the \event-notes actions populate with the details from the linked event use the option New note from Template after clicking/tapping the event in the inspector on the right:

\clipboard

  • action: inserts the text currently on the clipboard (i.e. copied in Agenda or a different app)
    Parameters
  • parameters: none
    Examples
  • \clipboard - Some copied text
    Note
  • Only textual clipboard content is support at the moment

\shared-content

  • action: inserts the content that was shared through the sharing extension, or input through the x-callback-url template-input parameter
    Parameters
  • parameters: none
    Examples
  • \shared-content - Something I shared
14 Likes