Skip to content

Commit b053eea

Browse files
author
Michael Yu
committed
MC-800: [Doc] Create Custom Content Block
- Update sample DaveMacaulay module to SamplePageBuilderModule
1 parent 559b0d4 commit b053eea

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/code/Magento/PageBuilder/docs/creating-custom-content-block.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@
6464

6565
Use the content type configuration to add new content types. Refer to content-type-configuration.md, in the configuration section for further details.
6666

67-
The following is an example of a custom container content type configuration in DaveMacaulay_PageBuilderGrid/view/base/pagebuilder/content_type/homepage_grid.xml:
67+
The following is an example of a custom container content type configuration in SamplePageBuilderModule_PageBuilderGrid/view/base/pagebuilder/content_type/homepage_grid.xml:
6868

6969
``` xml
7070
<type name="homepage-grid"
7171
label="Grid"
7272
component="Magento_PageBuilder/js/content-type-collection"
73-
preview_component="DaveMacaulay_PageBuilderGrid/js/content-type/homepage-grid/preview"
73+
preview_component="SamplePageBuilderModule_PageBuilderGrid/js/content-type/homepage-grid/preview"
7474
master_component="Magento_PageBuilder/js/content-type/master-collection"
7575
form="pagebuilder_homepage_grid_form"
7676
group="general"
@@ -86,8 +86,8 @@ The following is an example of a custom container content type configuration in
8686
<appearances>
8787
<appearance default="true"
8888
name="default"
89-
preview_template="DaveMacaulay_PageBuilderGrid/content-type/homepage-grid/default/preview"
90-
render_template="DaveMacaulay_PageBuilderGrid/content-type/homepage-grid/default/master"
89+
preview_template="SamplePageBuilderModule_PageBuilderGrid/content-type/homepage-grid/default/preview"
90+
render_template="SamplePageBuilderModule_PageBuilderGrid/content-type/homepage-grid/default/master"
9191
reader="Magento_PageBuilder/js/master-format/read/configurable">
9292
<elements>
9393
<element name="main">
@@ -126,13 +126,13 @@ The following is an example of a custom container content type configuration in
126126
</type>
127127
```
128128

129-
The following is an example of a custom container children content type configuration in DaveMacaulay_PageBuilderGrid/view/base/pagebuilder/content_type/homepage_grid_item.xml:
129+
The following is an example of a custom container children content type configuration in SamplePageBuilderModule_PageBuilderGrid/view/base/pagebuilder/content_type/homepage_grid_item.xml:
130130

131131
``` xml
132132
<type name="homepage-grid-item"
133133
label="Grid Item"
134134
component="Magento_PageBuilder/js/content-type-collection"
135-
preview_component="DaveMacaulay_PageBuilderGrid/js/content-type/homepage-grid-item/preview"
135+
preview_component="SamplePageBuilderModule_PageBuilderGrid/js/content-type/homepage-grid-item/preview"
136136
master_component="Magento_PageBuilder/js/content-type/master-collection"
137137
form="pagebuilder_homepage_grid_item_form"
138138
group="general"
@@ -151,8 +151,8 @@ The following is an example of a custom container children content type configur
151151
<appearances>
152152
<appearance default="true"
153153
name="default"
154-
preview_template="DaveMacaulay_PageBuilderGrid/content-type/homepage-grid-item/default/preview"
155-
render_template="DaveMacaulay_PageBuilderGrid/content-type/homepage-grid-item/default/master"
154+
preview_template="SamplePageBuilderModule_PageBuilderGrid/content-type/homepage-grid-item/default/preview"
155+
render_template="SamplePageBuilderModule_PageBuilderGrid/content-type/homepage-grid-item/default/master"
156156
reader="Magento_PageBuilder/js/master-format/read/configurable">
157157
<elements>
158158
<element name="main">
@@ -435,7 +435,7 @@ Following an example of a custom layout:
435435
<argument name="config" xsi:type="array">
436436
<item name="homepage-grid" xsi:type="array">
437437
<item name="default" xsi:type="array">
438-
<item name="component" xsi:type="string">DaveMacaulay_PageBuilderGrid/js/content-type/homepage-grid/appearance/default/widget</item>
438+
<item name="component" xsi:type="string">SamplePageBuilderModule_PageBuilderGrid/js/content-type/homepage-grid/appearance/default/widget</item>
439439
</item>
440440
</item>
441441
</argument>
@@ -451,7 +451,7 @@ This will get merged with the PageBuilders layout, adding the widget configurati
451451
Afterwards, it is time to create the actual widget. The widget should be stored in the component location in the layout configuration which in this example is:
452452

453453
``` xml
454-
DaveMacaulay_PageBuilderGrid/js/content-type/homepage-grid/appearance/default/widget
454+
SamplePageBuilderModule_PageBuilderGrid/js/content-type/homepage-grid/appearance/default/widget
455455
```
456456

457457
Inside the widget, it should look similar to preview component because it is similar. It is just a component dedicated to storefront content types.

0 commit comments

Comments
 (0)