Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
plugins:variable_substitution [2011/05/17 16:11] jayplugins:variable_substitution [2024/06/27 00:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Variable Substitution ======
  
 +With the release of Indigo 5 and server plugins, it's now possible for plugin writers to enable configuration text fields to accept special markup that will substitute a variable value at runtime. Any string with the following markup will have a variable value substituted: 
 +
 +<code>%%v:VARID%%</code>
 +
 +VARID is the unique variable ID as found in the UI in various places.
 +
 +So, for instance, if one of your actions is to use the [[growl_1|Growl plugin]] to do a notification, in the title and/or description fields you could enter something like this:
 +
 +<code>Turn on the A/C unit - the outside temperature is %%v:VARID%%.</code>
 +
 +The value specified would be substituted just before the notification was sent.
 +
 +Note - not all text fields will support variable substitution. The plugin developer must enable it specifically. Check the plugin documentation to see if the field you're interested in supports variable substitution.