Upgrade Notes for Crafter CMS 3.1.4¶
Remove References to Outdated Studio Freemarker Templates¶
When upgrading to Crafter CMS 3.1.4, outdated Studio Freemarker template files will be removed and is now replaced by templates provided by the Engine. Here are the old template files that will be removed when upgrading to Crafter CMS 3.1.4:
There are some sites that included the following template files
search-support.ftl (which is removed by the upgrader when upgrading to Crafter CMS 3.1.4) even though it is not being used. After upgrading to Crafter CMS 3.1.4, please remove references to those templates that have been removed through the upgrade as required.
Replace “overlayCallback” with “modePreview” in Freemarker/Groovy Code¶
Some early Crafter sites used
siteContext.overlayCallback to check if Engine was running in preview mode. In a later release, the
modePreview boolean variable was introduced to more clearly indicate that Engine is in preview mode.
overlayCallback has been removed in Crafter CMS 3.1.4. Please change your Freemarker/Groovy code to use
modePreview instead. For example, if a Freemarker code snippet contains the following:
<#if siteContext.overlayCallback??>, change it to
<#if modePreview>. See the first note here for more information.
In-Context Editing Macros and Attributes¶
When using FTL templates, you may be using the built-in macros to write the necessary HTML attributes to get in-context editing pencils and/or drag & drop of components. If you added the attributes manually, you’ll need to - in addition to the previous set of attributes you may already be using - do the following:
data-studio-embedded-item-idattribute to embedded component elements. The value should be the objectId property of the embedded content item model.
data-studio-zone-content-typeattribute to component container elements (drop zones). The value should be the content type id/path of the component container drop zone.
@studio.componentContainerAttrmacro has been updated. The tag attribute
objectIdis now replaced with the tag attribute
<@studio.componentContainerAttr target="..." objectId="contentModel.objectId"/>➜
<@studio.componentContainerAttr target="..." component=contentModel/>
@studio.componentAttrmacro has been updated. The tag attribute
pathis now replaced with the tag attribute
<@studio.componentAttr path=contentModel.storeUrl ... />➜
<@studio.componentAttr component=contentModel .../>