title: Concatenating text and variables using macro substitution
type: text/vnd.tiddlywiki
It's a frequent use case in ~TiddlyWiki that you will want to put the results of variables together with various bits of strings of text. This process in some programming languages is often referred to as "concatenating" text.
You might, for instance want to set up a template for your customer database, where links will automatically refer to additional contact information about your customer. Inside your tiddler, you might try something like this:
In this case, we passed the value of a variable directly to our macro. This is often a general way to go about this task. If you wanted to create more links based on other variables you could re-use the macro for each situation.
Notice that in this case we don't pass an argument. Instead, we reference the variable using the special syntax `$(variable)$`. Since we don't pass an argument, we can invoke it without the `<$macrocall>` widget more simply, like this: