Update Bloomreach Commerce Accelerator Templates
Use WebDAV to update Freemarker frontend templates in a running Bloomreach Commerce Accelerator instance.
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 files. BRIEF 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
You can access the web files over WebDAV using any WebDAV client (including web browsers) at the following URL:
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/.
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.