#SET

#SET{variable,value} is used to store values locally within a template. They are retrievable, within the same template, using #GET{variable}. See also #GET.

Example

Store the value of a colour that already exists in the environment, otherwise use a default colour:

  1. #SET{light,##ENV{light_colour,edf3fe}}
  2. #SET{dark,##ENV{dark_colour,3874b0}}
  3.  
  4. <style class="text/css">
  5. #contenu h3 {
  6. color:[(#GET{light})];
  7. }
  8. </style>

Download

Author Mark Baber Published : Updated : 29/05/10

Translations : English, français