Don't get put off by that programming term. Variable is simply a place that can hold different values at different times.
You can use the Couch tag named set to place values within variables. For example the following snippet -
<cms:set my_message='Hello World' />
- will place value 'Hello World' within a variable named my_message (i.e. set my_message to 'Hello World').
This variable (my_message) can then be used elsewhere.
For example, in the following snippet-
<cms:show 'Hello' />
- we are passing 'Hello' as the parameter for show to display. If instead we do the following -
<cms:show my_message />
- instead of explicitly passing 'Hello' as parameter, we are passing the value CONTAINED within my_message as the parameter. In this case 'Hello World' will get displayed.
Thus we see that variables act as simple containers for values.
The value can be changed anytime, thus-
<cms:set my_message='Salut!' /> <cms:show my_message />
- show will now display 'Salut!'.
In the examples above, we set the variable ourselves manually.
However, the variables that we'll be dealing with more often are those that we'll find automatically set for us. e.g. -
<cms:show k_template_name />
<cms:show k_page_link />
<cms:repeat count='4'>
<cms:show k_count /><br>
</cms:repeat
Having now seen what variables are, we can move on to complete the previous topic - Setting Tag's Parameters