Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi there! Styles consists of two entities, DisplayTemplates (display as) and DisplaySettings where the settings are scoped to the selected template. It's best to see templates as an abstraction for what could be a rendering component in your application and settings as the parameters that would apply to those rendering components. Consider the following setup for a section as an example:
In the above example, two display templates (Default & Card) are assigned to the "section" base type with settings that apply to the respective template. In your example above I'm assuming the heading is rendered fairly similarly but you want to add (primary/secondary) style that the editor can choose between. If that is the case I would probably have defined it using a single template with a setting:
Seems like it is required to have one display template set to default.
I can add two display templates to the same type, turns out like this:
Have you been creating multiple display templates like this or have you mainly had a single display template, with added settings to customize?