This article explains how to update variants in the Web Editor.
The code in each variant is used to modify the page contexts in your digital experience. Variants can be used to modify page elements, styles, layouts, and functionality. It may be necessary to update a variant after it was initially created in order to meet changing circumstances, e.g. modified target element or context, new requirements, etc.
Steps to update variants in the Web Editor
- In the top right of the Editor, select Edit Mode from the menu.
- Click on a variable name to show its constituent variants.
- Right-click on the variant to reveal its options: Rename and Delete.
- To modify the code within the variant, click on the variant name. The variant code will render within the corresponding context in the Preview Window and display the editable variant code in the right panel.
- Enter the CSS or JS changes in the variant text area.
- Click Save.
In order to apply your changes to a live project, you must publish your changes.
Learn more: Publishing a project