Skip to content

Commit 6c7fa0d

Browse files
MAGETWO-90998: Extension developer has to specify all fields in order to extend content type.
- fix the order of the attributes in the documentation
1 parent b077d34 commit 6c7fa0d

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

app/code/Magento/PageBuilder/docs/content-type-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following is an example of a content type configuration in `view/adminhtml/p
6161
</element>
6262
<element name="link" path=".//a">
6363
<attributes>
64-
<complex_attribute name="link_url" persist="false" reader="Magento_PageBuilder/js/property/default/link"/>
64+
<complex_attribute name="link_url" reader="Magento_PageBuilder/js/property/default/link" persist="false"/>
6565
<attribute name="link_url" source="href" virtual="true" converter="Magento_PageBuilder/js/converter/default/attribute/link-href" />
6666
<attribute name="link_url" source="target" virtual="true" converter="Magento_PageBuilder/js/converter/default/attribute/link-target" />
6767
<attribute name="link_url" source="data-link-type" virtual="true" converter="Magento_PageBuilder/js/converter/default/attribute/link-type" />
@@ -240,7 +240,7 @@ Set the `default` attribute to "true" in an `appearance` node to set the default
240240
</element>
241241
<element name="link" path=".//a">
242242
<attributes>
243-
<complex_attribute name="link_url" persist="false" reader="Magento_PageBuilder/js/property/default/link"/>
243+
<complex_attribute name="link_url" reader="Magento_PageBuilder/js/property/default/link" persist="false"/>
244244
<attribute name="link_url" source="href" virtual="true" converter="Magento_PageBuilder/js/converter/default/attribute/link-href" />
245245
<attribute name="link_url" source="target" virtual="true" converter="Magento_PageBuilder/js/converter/default/attribute/link-target" />
246246
<attribute name="link_url" source="data-link-type" virtual="true" converter="Magento_PageBuilder/js/converter/default/attribute/link-type" />

app/code/Magento/PageBuilder/docs/how-to-add-new-content-type.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ To add configuration for a new content type, create a file under the following l
2323
<elements>
2424
<element name="main" path=".">
2525
<style_properties>
26-
<property source="text_align" name="text_align"/>
27-
<property source="border_style" name="border"/>
28-
<property converter="Magento_PageBuilder/js/converter/style/color" source="border_color" name="border_color"/>
29-
<property converter="Magento_PageBuilder/js/converter/style/border-width" source="border_width" name="border_width"/>
30-
<property converter="Magento_PageBuilder/js/converter/style/remove-px" source="border_radius" name="border_radius"/>
31-
<complex_property converter="Magento_PageBuilder/js/converter/style/margins-and-paddings" reader="Magento_PageBuilder/js/property/margins-and-paddings" name="margins_and_padding"/>
26+
<property name="text_align" source="text_align"/>
27+
<property name="border" source="border_style"/>
28+
<property name="border_color" source="border_color" converter="Magento_PageBuilder/js/converter/style/color"/>
29+
<property name="border_width" source="border_width" converter="Magento_PageBuilder/js/converter/style/border-width"/>
30+
<property name="border_radius" source="border_radius" converter="Magento_PageBuilder/js/converter/style/remove-px"/>
31+
<complex_property name="margins_and_padding" reader="Magento_PageBuilder/js/property/margins-and-paddings" converter="Magento_PageBuilder/js/converter/style/margins-and-paddings"/>
3232
</style_properties>
3333
<attributes>
34-
<attribute source="data-role" name="name"/>
34+
<attribute name="name" source="data-role"/>
3535
</attributes>
3636
<css name="css_classes"/>
3737
</element>
@@ -220,15 +220,15 @@ Now, let's add content type that can contain other content types. Create configu
220220
<elements>
221221
<element name="main" path=".">
222222
<style_properties>
223-
<property source="text_align" name="text_align"/>
224-
<property source="border_style" name="border"/>
225-
<property converter="Magento_PageBuilder/js/converter/style/color" source="border_color" name="border_color"/>
226-
<property converter="Magento_PageBuilder/js/converter/style/border-width" source="border_width" name="border_width"/>
227-
<property converter="Magento_PageBuilder/js/converter/style/remove-px" source="border_radius" name="border_radius"/>
228-
<complex_property converter="Magento_PageBuilder/js/converter/style/margins-and-paddings" reader="Magento_PageBuilder/js/property/margins-and-paddings" name="margins_and_padding"/>
223+
<property name="text_align" source="text_align"/>
224+
<property name="border" source="border_style"/>
225+
<property name="border_color" source="border_color" converter="Magento_PageBuilder/js/converter/style/color"/>
226+
<property name="border_width" source="border_width" converter="Magento_PageBuilder/js/converter/style/border-width"/>
227+
<property name="border_radius" source="border_radius" converter="Magento_PageBuilder/js/converter/style/remove-px"/>
228+
<complex_property name="margins_and_padding" reader="Magento_PageBuilder/js/property/margins-and-paddings" converter="Magento_PageBuilder/js/converter/style/margins-and-paddings"/>
229229
</style_properties>
230230
<attributes>
231-
<attribute source="data-role" name="name"/>
231+
<attribute name="name" source="data-role"/>
232232
</attributes>
233233
<css name="css_classes"/>
234234
</element>

0 commit comments

Comments
 (0)