You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/code/Magento/PageBuilder/docs/creating-custom-content-block.md
+5-48Lines changed: 5 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,11 @@ The following is an example of a custom container children content type configur
150
150
<parentsdefault_policy="deny">
151
151
<parentname="homepage-grid"policy="allow"/>
152
152
</parents>
153
+
<childrendefault_policy="deny">
154
+
<childname="heading"policy="allow"/>
155
+
<childname="buttons"policy="allow"/>
156
+
<childname="text"policy="allow"/>
157
+
</children>
153
158
<is_visible>false</is_visible>
154
159
<appearances>
155
160
<appearancedefault="true"
@@ -197,57 +202,9 @@ The following is an example of a custom container children content type configur
197
202
</appearance>
198
203
</appearances>
199
204
</type>
200
-
<typename="heading">
201
-
<parentsdefault_policy="allow">
202
-
<parentname="homepage-grid-item"policy="allow"/>
203
-
</parents>
204
-
</type>
205
-
<typename="buttons">
206
-
<parentsdefault_policy="allow">
207
-
<parentname="homepage-grid-item"policy="allow"/>
208
-
</parents>
209
-
</type>
210
-
<typename="text">
211
-
<parentsdefault_policy="allow">
212
-
<parentname="homepage-grid-item"policy="allow"/>
213
-
</parents>
214
-
</type>
215
-
<typename="column">
216
-
<parentsdefault_policy="allow">
217
-
<parentname="homepage-grid-item"policy="allow"/>
218
-
</parents>
219
-
</type>
220
205
</content_types>
221
206
```
222
207
223
-
Do take notice of the following code snippet from above:
224
-
```xml
225
-
<typename="heading">
226
-
<parentsdefault_policy="allow">
227
-
<parentname="homepage-grid-item"policy="allow"/>
228
-
</parents>
229
-
</type>
230
-
<typename="buttons">
231
-
<parentsdefault_policy="allow">
232
-
<parentname="homepage-grid-item"policy="allow"/>
233
-
</parents>
234
-
</type>
235
-
<typename="text">
236
-
<parentsdefault_policy="allow">
237
-
<parentname="homepage-grid-item"policy="allow"/>
238
-
</parents>
239
-
</type>
240
-
<typename="column">
241
-
<parentsdefault_policy="allow">
242
-
<parentname="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
-
251
208
### Preview template & block system
252
209
253
210
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