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
By convention, Page Builder requires the configuration for a content type to be in the `adminhtml` area within a directory named `pagebuilder` and a subdirectory named `content_type` or `content-type`.
17
17
@@ -22,9 +22,9 @@ The name of your configuration file should reflect the name of your content type
22
22
{: .bs-callout .bs-callout-info }
23
23
The reason we suggest prefIxing your content type with your vendor name is to prevent Magento from merging your content type configuration file with another configuration file of the same name, or with a future content type published by Magento.
24
24
25
-
## Example configuration
25
+
## The `example_quote` configuration
26
26
27
-
In this example, only a subset of configuration elements are described in our Quote example (enough to understand the basic role of the configuration file). For more details, refer to [Content type configurations](../configurations/content-type-configuration.md) and [Additional configurations](../configurations/additional-configurations.md).
27
+
Only a subset of configuration elements are described in our Quote example (enough to understand the basic role of the configuration file). For more details, refer to [Content type configurations](../configurations/content-type-configuration.md) and [Additional configurations](../configurations/additional-configurations.md).
28
28
29
29
30
30
The following configuration is from the Quote content type. An overview of these elements and attributes are described in the tables that follow.
@@ -119,7 +119,7 @@ Going further, each `appearance` is defined by exactly two HTML templates, one t
119
119
120
120
## The `elements` element
121
121
122
-
The purpose of `<elements>` as defined within an appearance is to map the data from the content type's edit form to the content type's master format so that the values entered in the form can be stored and rendered correctly on the Admin stage and storefront. We will describe the`elements` in [Step 4: Add form](step-4-add-form.md)
122
+
The `<elements>`element as defined within an `appearance` is to map the data from the content type's form editor to the content type's master format so that the values entered in the form can be stored and rendered correctly on the Admin stage and storefront. We discuss content type`elements` in [Step 4: Add form](step-4-add-form.md)
Copy file name to clipboardExpand all lines: docs/create-basic-content-type/step-2-add-templates.md
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -68,9 +68,9 @@ The following table describes each `appearance` attribute in our example.
68
68
|`render_template`| References the `master.html` (the master format storefront template) for rendering the appearance of your content type on the storefront for customers to see. |
69
69
|`reader`| Reads content type data from the master format. |
70
70
71
-
## Quote `preview.html`
71
+
## Quote `preview_template`
72
72
73
-
The `preview.html` template defined for our Quote's appearance, is shown here in full followed by descriptions to help you understand the basics of this template.
73
+
The Quote `preview_template` (`preview.html`) is shown here in full, followed by the attribute descriptions to help you understand the basics of content type templates.
74
74
75
75
```html
76
76
<!-- preview.html -->
@@ -171,9 +171,9 @@ The `liveEdit` binding enables end users to enter HTML content directly on the A
171
171
172
172
The `event` attribute enables the options menu to be shown and hidden when users interact with the content type using the mouse. If you have a special circumstance with the way you wish to handle your option menus, you can modify this logic to suit your needs.
173
173
174
-
## Quote `master.html`
174
+
## Quote `render_template`
175
175
176
-
The `master.html` template defined for the Quote appearance is shown here in full. The same attributes and descriptions from the Admin preview template apply to this template as well, with one addition, the `html` attribute.
176
+
The Quote `render_template` (`master.html`) is shown here in full. The same attributes and descriptions from the `preview.html` template apply to the `master.html`template as well. However, the `master.html` template introduces one addition attribute, `html`, which is described after the code.
177
177
178
178
```html
179
179
<!--master.html-->
@@ -200,17 +200,17 @@ The `master.html` template defined for the Quote appearance is shown here in ful
200
200
201
201
### html
202
202
203
-
The `html` attribute applies the actual user-entered HTML to the template element. In our Quote example, the end-user enters their quote text either from the Admin stage using `liveEdit`, which is bound to the `quote_text` field, or from the form.
203
+
The `html` attribute applies the actual user-entered HTML content to the template element. In our Quote example, the end-user enters their quote text either on the Admin stage using `liveEdit` (which is bound to the `quote_text` field in the form editor) or on the form, directly into the`quote_text` field itself.
204
+
205
+
For example, from the Quote `preview.html` template, the `liveEdit` binding on the `blockquote` is bound to the `quote_text` field that stores the HTML content, as shown here (`{ field: 'quote_text'...}`):
0 commit comments