Use Tokens to Allow Custom Controller File Portability

When a site is created, the name of the site is used in the controller file. This ties the controller file to the named site and makes the controller file unable to be used between sites.

Using a controller file on a site with a different name than what is used in the controller file will not work. This also applies to sites created from a site template having a custom controller file. The following dynamically evaluated tokens allow the controller file to be used with multiple sites.

Token Description

[!--$SCS_SITE_PREFIX--]

This evaluates to the site prefix for the current site. Value examples might include:
/site/MySite/
or
/site/authsite/MySecureSite/ 

[!--$SCS_SITE_PATH--]

This evaluates to the current product CDN location. The value will not have a trailing '/' character. Value examples might include:
/site/MySite/_cache_0000
or
/site/authsite/MySecureSite

[!--$SCS_PRODUCT_PATH--]

This evaluates to the current product URL, including cache key, if applicable. The value will not have a trailing '/' character. Value examples might include:
https://www.example.com/cdn/cec/v21.1.2.23
or
https://www.example.com/cdn/cec/v21.1.3.18