hello,
how do i pass parameters/arguments to snippets?
thanks.
-
☆ A M B ☆
- 24,524 Posts
[[SnippetName? ¶meter=`value` ¶meter2=`value2`]]
Or, you can put global parameter in the snippet’s configuration:
¶mname=Param Label;type;value ¶mname2=Param2 Label;type;value2
Or put them in an external configuration file (which is itself specified as a snippet parameter, &config=`filename`)
$parameter = "value";
$parameter2 = "value 2";
and the file $filename gets included at the beginning of the snippet code.
In all three cases, the parameter name will become a variable name, and its value will be the parameter’s value. So ¶mname will be converted to $paramname for use in the snippet code.
Don’t forget to use back-ticks rather than single quotes to mark the parameter values in the snippet call.
Bob