@@ -123,9 +123,9 @@ The following is an example of a content type configuration in `view/adminhtml/p
123
123
<element name =" link" path =" .//a" >
124
124
<attributes >
125
125
<complex_attribute name =" link_url" reader =" Magento_PageBuilder/js/property/link" persist =" false" />
126
- <attribute name =" link_url" source =" href" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-href" />
127
- <attribute name =" link_url" source =" target" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-target" />
128
- <attribute name =" link_url" source =" data-link-type" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-type" />
126
+ <attribute name =" virtual_link_href " storage_key = " link_url" source =" href" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-href" />
127
+ <attribute name =" virtual_link_target " storage_key = " link_url" source =" target" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-target" />
128
+ <attribute name =" virtual_link_type " storage_key = " link_url" source =" data-link-type" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-type" />
129
129
</attributes >
130
130
</element >
131
131
<element name =" overlay" path =" .//a/div[2]/div" >
@@ -137,7 +137,7 @@ The following is an example of a content type configuration in `view/adminhtml/p
137
137
<attributes >
138
138
<attribute name =" overlay_color" source =" data-overlay-color" persist =" false" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-color" />
139
139
<attribute name =" overlay_transparency" source =" data-overlay-color" persist =" false" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-transparency" />
140
- <attribute name =" overlay_transparency" source =" data-overlay-color" virtual =" true" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-color-transparency" />
140
+ <attribute name =" virtual_overlay_transparency " storage_key = " overlay_transparency" source =" data-overlay-color" virtual =" true" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-color-transparency" />
141
141
</attributes >
142
142
</element >
143
143
<element name =" desktop_image" path =" .//a/div[1]" >
@@ -316,16 +316,16 @@ Set the `default` attribute to "true" in an `appearance` node to set the default
316
316
<element name =" link" path =" .//a" >
317
317
<attributes >
318
318
<complex_attribute name =" link_url" reader =" Magento_PageBuilder/js/property/link" persist =" false" />
319
- <attribute name =" link_url" source =" href" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-href" />
320
- <attribute name =" link_url" source =" target" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-target" />
321
- <attribute name =" link_url" source =" data-link-type" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-type" />
319
+ <attribute name =" virtual_link_href " storage_key = " link_url" source =" href" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-href" />
320
+ <attribute name =" virtual_link_target " storage_key = " link_url" source =" target" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-target" />
321
+ <attribute name =" virtual_link_type " storage_key = " link_url" source =" data-link-type" virtual =" true" converter =" Magento_PageBuilder/js/converter/attribute/link-type" />
322
322
</attributes >
323
323
</element >
324
324
<element name =" overlay" path =" .//a/div[2]/div" >
325
325
<attributes >
326
326
<attribute name =" overlay_color" source =" data-overlay-color" persist =" false" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-color" />
327
327
<attribute name =" overlay_transparency" source =" data-overlay-color" persist =" false" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-transparency" />
328
- <attribute name =" overlay_transparency" source =" data-overlay-color" virtual =" true" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-color-transparency" />
328
+ <attribute name =" virtual_overlay_transparency " storage_key = " overlay_transparency" source =" data-overlay-color" virtual =" true" converter =" Magento_PageBuilder/js/converter/banner/attribute/overlay-color-transparency" />
329
329
</attributes >
330
330
</element >
331
331
<element name =" desktop_image" path =" .//a/div[1]" >
@@ -368,7 +368,8 @@ Set the `default` attribute to "true" in an `appearance` node to set the default
368
368
369
369
| Attribute | Description |
370
370
| ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
371
- | ` name ` | The variable name for value in the data storage. Must be unique for the content type. |
371
+ | ` name ` | Unique name used for configuration merging, and the default value for storage_key if none is provided. |
372
+ | ` storage_key ` | Optional variable name for value in the data storage. If no value is provided, name will be used. |
372
373
| ` source ` | The name of the property in the DOM. Must be in snake case. |
373
374
| ` converter ` | Converts the value after reading or before saving to the DOM. |
374
375
| ` preview_converter ` | Converts the value for the preview. Used for cases where the conversion logic is different between the two views. |
@@ -381,7 +382,7 @@ Set the `default` attribute to "true" in an `appearance` node to set the default
381
382
382
383
``` xml
383
384
<style_properties >
384
- <complex_property name =" margins_and_padding" reader =" Magento_PageBuilder/js/property/margins" converter =" Magento_PageBuilder/js/converter/style/margins" />
385
+ <complex_property name =" margins " storage_key = " margins_and_padding" reader =" Magento_PageBuilder/js/property/margins" converter =" Magento_PageBuilder/js/converter/style/margins" />
385
386
</style_properties >
386
387
```
387
388
0 commit comments