When managing multiple websites it is sometimes necessary to record information specific to each site. Although values that are common to all sites can be added to the Site Content Type as additional fields, there are times when data is unique only to a few sites or different on every site. In these cases unique values that refer to specific sites are better stored in specific site variables.
To add a site variable to a site use the following steps:
- From the CMS Admin tab click Sites from the drop down menu.
- Using the site variable manager, click on "+Add new Site Variable"
- Provide a name for the variable- this is just a label
- Provide a unique key for the variable- this is the variable name by which the value can be called dynamically
- Provide the site specific data in the value field
After setting site variables, they can be called dynamically anywhere on ANY site using the following Velocity statement:
$host_variable is a reserved variable and the key refers to value set in the keyfield of the site variable.