Using Tokens to Enhance controller.htm Portability

By default the site name is hard-coded into the controller.html files, making it difficult to rename a site or to reuse identical custom controllers across multiple sites. Tokens can be used to alleviate this issue. The following sample shows how portability tokens can be used.

Note:

The the <link> tags in the sample are for demonstration only. The baseline controller.html would not include these.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1">
<script type="text/javascript">
var SCS = { sitePrefix: '[!--$SCS_SITE_PREFIX--]' };
</script>
<script src="[!--$SCS_PRODUCT_PATH--]/_sitesclouddelivery/renderer/controller.js"></script>
<link rel="shortcut icon" href="[!--$SCS_SITE_PATH--]/favicon.ico">
<link rel="preload" href="[!--$SCS_PRODUCT_PATH--]/_sitesclouddelivery/renderer/require.js" as="script">
<link rel="preload" href="[!--$SCS_PRODUCT_PATH--]/_sitesclouddelivery/renderer/renderer.js" as="script">
</head>
<body id="scsControllerBody"><noscript>Please enable JavaScript to view this site properly.</noscript>
<img id="scsWaitImage" style="display: none; margin-top: 5%; margin-left: auto; margin-right: auto;" src="data:image/png;base64,..." />
</body></html>