Remote Page Templates provide a way to host Page Templates on a remote server, as opposed to within the CMS itself.

This can be useful for a variety of use cases.  For instance, if the CMS is integrated into an existing web application, version control may be improved by keeping the Page Templates in the same source code repository as the web application.

Remote Templates can be set up as follows:

  1. Add the Remote Page Template under the Site "Page Templates" tab
    1. Set a Name and Title for the new template
    2. Enter the full URL of the Remote Template in the URL field
    3. Configure additional cms-page-config JSON properties by clicking the edit button under the Config column.

  2. Modify the Remote Template HTML, launch the CMS Editor script on startup:

    1. Download the jsHarmonyCmsClient.min.js library into your project. Alternatively download from the jsharmony-cms-sdk-clientjs GitHub page or NPM

    2. Generate the Integration Code
      1. Open the Site's Deployment Target that will be used with the Remote Template
      2. Select the "Integration Code" tab
      3. Select the Environment: "Remote Template"

    3. Copy the Integration Code code into the HEAD tag of your Remote Template
      * Be sure to update the path to jsHarmonyCmsClient.min.js to where the file was saved in step 2(a)
      * Keep the "removeOnPublish" class in the Launcher script tags, so that the Launcher will not be included in the published pages
      <script type="text/javascript" class="removeOnPublish" src="path/to/jsHarmonyCmsClient.min.js"></script>
      <script type="text/javascript" class="removeOnPublish">
      jsHarmonyCmsClient({"access_keys":["*****ACCESS_KEY*****"]});
      </script>
  3. Follow the steps under Creating Page Templates to define the editable areas
Loading
Loading