This page is part of a static HTML representation of the TiddlyWiki at

substitute Operator

 15th June 2023 at 5:30pm
purposereturns each item in the list, replacing within each title placeholders for filters, parameters and variables with their corresponding values
inputa selection of titles
parameterthe substitute operator optionally accepts a variable number of parameters, see below for details
outputthe input titles with placeholders for filter expressions, parameter and variables replaced with their corresponding values

Learn more about how to use Filters

New in: 5.3.0

The substitute operator replaces any placeholders in the input titles in the following order:

  1. filter expressions
  2. parameters to the substitute operator
  3. variables
placeholder syntaxdescription
$n$Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged.
$(varname)$Text substitution of a variable. Undefined variables are replaced with an empty string.
${ filter expression }$Text substitution of the first result of evaluating a filter expression. In other words, if the filter returns multiple titles only the first one will be used.

Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the substitute operator as text references or variables