Home

Awesome

Westco SXA Extensions

Westco SXA Extensions is a set of extensions for Sitecore Experience Accelerator module.

Solution follows Helix.

Current Westco SXA Extensions project is compatible with:

ProductVersionRevision
Sitecore8.2rev. 171121
SXA1.6rev. 180103

License

Setup

Getting started is fairly straightforward. Install the package.


Asset Include

Create a new tenant and ensure that the Westco Theming feature is enabled.

Imgur

Create a new site and ensure that the Westco Geospatial and Westco Maps features are enabled. These two are similar to those OOTB with SXA but offer a Static Maps component.

Imgur

Assets served by a CDN with local fallback

In the Media Library you simply create new Assets to represent your JavaScript and CSS resources from a CDN.

Imgur

Note: The Url, SRI, and CORS values are all made available by the CDN.

You can associate assets at a site level by specifying on the Settings item in the Asset Configuration section.

Imgur

You can associate assets on a page level by specifying in the Asset Configuration section.

Imgur

Finally, see that the Html is injected in the <head> and <body>.

Imgur

The final Html output may look like the following:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="/-/media/Assets/jquery/jquery-3-2-1/Scripts/optimized-min.js?t=20170614T032244Z">\x3C/script>')</script>
<script>console.log('Run after CDN link and fallback test.');</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js" integrity="sha256-1hjUhpc44NwiNg8OwMu2QzJXhD8kcj+sJA3aCQZoUjg=" crossorigin="anonymous"></script>

Asset modes

The configured mode determines the type of html to generate.

Url and SRI

The details needed for specifying the Url and SRI can be found on cdnjs.com

Imgur


Michael West
Michael West