Update Bloomreach Commerce Accelerator Templates - Bloomreach Experience - Open Source CMS
28-02-2020

Update Bloomreach Commerce Accelerator Templates

This Bloomreach Experience Manager feature requires a standard or premium license. Please contact Bloomreach for more information.

Introduction

Goal

Use WebDAV to update Freemarker frontend templates in a running Bloomreach Commerce Accelerator instance.

Background

As Bloomreach Commerce Accelerator provides many reusable components and commands out-of-the-box, typically the customization work for a Bloomreach Commerce Accelerator instance will mainly consist of adapting its look and feel by modifying the provided frontend templates.

Freemarker frontend templates are stored in the content repository as web filesBRIEF exposes these web files through a secure WebDAV endpoint, enabling developers to update Freemarker templates in a running Bloomreach Commerce Accelerator instance on-the-fly.

This page provides instructions on how to access the templates over WebDAV, as well as some pointers on best practices.

Enable WebDAV Access

By default, WebDAV access is disabled for more security. To enable WebDAV access, set the following property to true in the HST-2 Container configuration file (e.g, conf/hst.properties):

# Flag whether the WebDAV access to webfiles is enabled or not.
starterstore.webdav.access.enabled = true

WebDAV Endpoint

You can access the web files over WebDAV using any WebDAV client (including web browsers) at the following URL:

https://<domain>/cms/webdav/default/webfiles/

Log in as CMS user with admin privileges.

The Freemarker templates are located in subdirectories of /cms/webdav/default/webfiles/site/freemarker/.

Bloomreach Commerce Accelerator component templates (e.g. login form, product detail, etc.) are in /cms/webdav/default/webfiles/site/freemarker/hstdefault/.

Generic page layout templates (e.g. header, footer, etc.) are in /cms/webdav/default/webfiles/site/freemarker/starterstoreboot/.

WebDAV Clients

Depending on their personal preferences, developers can choose from any available WebDAV client such as Cadaver for a command line interface and scripting.

Best Practices

It makes sense to establish some kind of process to update templates. Consider incorporating the following best practices in your process:

  • Mirror the web files directory structure in your local development environment.
  • Keep the local mirror of the web files under version control (e.g. Git).
  • Update templates in the running Bloomreach Commerce Accelerator instance by synchronizing the local and remote directory structures (perhaps from a dedicated VCS branch).
  • Automate where possible.
  • Keep it simple.
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?