Skip to content

Commit f5e4964

Browse files
author
Michael Yu
committed
MC-800: [Doc] Create Custom Content Block
- Fixed minor configuration documentation
1 parent 72a1ffe commit f5e4964

File tree

1 file changed

+5
-48
lines changed

1 file changed

+5
-48
lines changed

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

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ The following is an example of a custom container children content type configur
150150
<parents default_policy="deny">
151151
<parent name="homepage-grid" policy="allow"/>
152152
</parents>
153+
<children default_policy="deny">
154+
<child name="heading" policy="allow"/>
155+
<child name="buttons" policy="allow"/>
156+
<child name="text" policy="allow"/>
157+
</children>
153158
<is_visible>false</is_visible>
154159
<appearances>
155160
<appearance default="true"
@@ -197,57 +202,9 @@ The following is an example of a custom container children content type configur
197202
</appearance>
198203
</appearances>
199204
</type>
200-
<type name="heading">
201-
<parents default_policy="allow">
202-
<parent name="homepage-grid-item" policy="allow"/>
203-
</parents>
204-
</type>
205-
<type name="buttons">
206-
<parents default_policy="allow">
207-
<parent name="homepage-grid-item" policy="allow"/>
208-
</parents>
209-
</type>
210-
<type name="text">
211-
<parents default_policy="allow">
212-
<parent name="homepage-grid-item" policy="allow"/>
213-
</parents>
214-
</type>
215-
<type name="column">
216-
<parents default_policy="allow">
217-
<parent name="homepage-grid-item" policy="allow"/>
218-
</parents>
219-
</type>
220205
</content_types>
221206
```
222207

223-
Do take notice of the following code snippet from above:
224-
``` xml
225-
<type name="heading">
226-
<parents default_policy="allow">
227-
<parent name="homepage-grid-item" policy="allow"/>
228-
</parents>
229-
</type>
230-
<type name="buttons">
231-
<parents default_policy="allow">
232-
<parent name="homepage-grid-item" policy="allow"/>
233-
</parents>
234-
</type>
235-
<type name="text">
236-
<parents default_policy="allow">
237-
<parent name="homepage-grid-item" policy="allow"/>
238-
</parents>
239-
</type>
240-
<type name="column">
241-
<parents default_policy="allow">
242-
<parent name="homepage-grid-item" policy="allow"/>
243-
</parents>
244-
</type>
245-
246-
```
247-
248-
This allows the configuration to further interact with existing content types.
249-
Remember, parent policies overrules children policies.
250-
251208
### Preview template & block system
252209

253210
In the configuration file, a preview template path is set for it and PageBuilder will reader the selected file to treat it as the preview template for the content type.

0 commit comments

Comments
 (0)