CDTS stands for Centrally Deployed Templates Solution.
A JavaScript templating solution hosted on a Content Delivery Network (CDN) that uses Google Closure Templates (GCT).
<script src="https://www.canada.ca/etc/designs/canada/cdts/gcweb/v4_0_31/cdts/compiled/soyutils.js"></script>
<script src="https://www.canada.ca/etc/designs/canada/cdts/gcweb/v4_0_31/cdts/compiled/wet-en.js"></script>
When WET releases and makes changes to the framework, the CDTS updates all the supporting files on our server so you don't have to.
<ul class="list-inline margin-bottom-none">
<li>
<a href="content-fr.shtml" lang="fr">Français</a>
</li>
</ul>
<ul class="list-inline margin-bottom-none">
<li>
<a hreflang="fr" href="content-fr.shtml" lang="fr">Français</a>
</li>
</ul>
We usually release two weeks after a WET release.
Components from the top of the page controlled by the CDTS:
Components from the bottom of the page controlled by the CDTS:
Sections of the source code controlled by the CDTS JavaScript:
Used to control the components in the head
element.
<script>
document.write(wet.builder.refTop({
"cdnEnv": "prod",
"jqueryEnv" : "external",
"webAnalytics" : [{
"environment" : "production",
"version" : 2
}],
"isApplication" : true
}));
</script>
Used to control the components in the header and before the main
.
<script>
var defTop = document.getElementById("def-top");
defTop.outerHTML = wet.builder.top({
"cdnEnv" : "prod",
"lngLinks" : [{
"lang" : "fr",
"href" : "content-fr.shtml",
"text" : "Français"
}],
"breadcrumbs": [{
"title": "Home",
"href": "https://www.canada.ca/en/index.html"
},{
"title": "CDTS",
"acronym": "Centrally Deployed Templates Solution",
"href": "https://www.canada.ca/en/index.html"
}],
"showPreContent": true
});
</script>
Used to control the template content right above the footer
.
<script>
var defPreFooter = document.getElementById("def-preFooter");
defPreFooter.outerHTML = wet.builder.preFooter({
"cdnEnv": "prod",
"dateModified": "2019-07-31",
"showShare": [
"email",
"facebook",
"linkedin",
"twitter"
],
"showFeedback": "https://www.domain.gc.ca"
});
</script>
Used to control the template content in the footer
.
<script>
var defFooter = document.getElementById("def-footer");
defFooter.outerHTML = wet.builder.footer({
"cdnEnv": "prod",
"contactLinks": "https://www.department.gc.ca/en/contact.html"
});
</script>
Used to control the template content that is placed after the footer, such as scripts and elements hidden from the user.
<script>
document.write(wet.builder.refFooter({
"cdnEnv": "prod",
"webAnalytics" : true,
"exitScript": true,
"exitURL": "https://wwww.domain.gc.ca/out.html",
"exitMsg": "You are about to leave a secure site, do you wish to continue?",
"exitDomains": "https://wwwwdomain.gc.ca",
"displayModal": false,
"jqueryEnv": external
}));
</script>
For Application Developers
They implement the CDTS configurations for you!
Basically, they add classes to your project that allow a developer to customize and manipulate the configurations of CDTS with the back end code, with practically no setup.
DotNetTemplates
Java Templates (Java 8+)
Built and Released with hierarchy, you can add your own sub components if we don't provide it.
Both projects are managed and supported through GCcode.