Learn how to use alias mapping to update module fields without breaking existing content.
aliases_mapping
property to map the field to another one in fields.json
. Then, when a value has not been set for the original field, HubSpot will check if a value exists in the mapped field. If no value exists in the mapped field either, it will use the default value instead. This property can be used to map field values between different versions of a module only when the stored data type of the old field is the same as the new field’s stored data type.
For a visual walkthrough of this feature, check out the video below.
To migrate existing fields to aliases:
aliases_mapping
property in the fields.json
file.module.html
file to use the new fields definition.size
subfield to control font size.aliases_mapping
when moving a color field from the module’s Content tab to the Styles tab.
Original module code:
size
subfield to map it to the old number field by using dot notation.