Skip to content

Commit dc7f11a

Browse files
committed
MC-5710: Beta docs tutorial
Combined steps 4 and 5 into one step 4 add editor
1 parent 479dc48 commit dc7f11a

16 files changed

+70
-110
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ We offer one method for installing PageBuilder:
3838
* [Step 1: Add configuration](docs/create-basic-content-type/step-1-add-configuration.md)
3939
* [Step 2: Add templates](docs/create-basic-content-type/step-2-add-templates.md)
4040
* [Step 3: Add components](docs/create-basic-content-type/step-3-add-components.md)
41-
* [Step 4: Add form editor](docs/create-basic-content-type/step-4-add-form-editor.md)
42-
* [Step 5: Add layout](docs/create-basic-content-type/step-5-add-layout.md)
43-
* [Step 6: Add styles](docs/create-basic-content-type/step-6-add-styles.md)
44-
* [Step 7: Add frontend widget](docs/create-basic-content-type/step-7-add-frontend-widget.md)
41+
* [Step 4: Add editor](docs/create-basic-content-type/step-4-add-editor.md)
42+
* [Step 5: Add styles](docs/create-basic-content-type/step-5-add-styles.md)
43+
* [Step 6: Add frontend widget](docs/create-basic-content-type/step-6-add-frontend-widget.md)
4544
* [What's next](docs/create-basic-content-type/whats-next.md)
4645

4746
### Configurations

docs/_pagebuilder.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,15 @@ pages:
3535
url: /page-builder/create-basic-content-type/step-3-add-components.html
3636
versionless: true
3737

38-
- label: Step 4. Add form editor
39-
url: /page-builder/create-basic-content-type/step-4-add-form-editor.html
38+
- label: Step 4. Add editor
39+
url: /page-builder/create-basic-content-type/step-4-add-editor.html
4040
versionless: true
4141

42-
- label: Step 5. Add layout
43-
url: /page-builder/create-basic-content-type/step-5-add-layout.html
42+
- label: Step 5. Add styles
43+
url: /page-builder/create-basic-content-type/step-6-add-styles.html
4444
versionless: true
4545

46-
- label: Step 6. Add styles and icons
47-
url: /page-builder/create-basic-content-type/step-6-add-styles-icons.html
48-
versionless: true
49-
50-
- label: Step 7. Add frontend widget
46+
- label: Step 6. Add frontend widget
5147
url: /page-builder/create-basic-content-type/step-7-add-frontend-widget.html
5248
versionless: true
5349

docs/create-basic-content-type/overview.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<!-- {% raw %} -->
2-
{: .bs-callout .bs-callout-warning }
3-
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
42

53
# Overview
64

7-
{: .bs-callout .bs-callout-info }
5+
{: .bs-callout .bs-callout-warning }
86
The development of this tutorial is currently **IN PROGRESS**. A more complete rough draft is available in the How Tos section here: [How to develop a new content type](docs/how-to/how-to-develop-new-content-type.md). When this tutorial is complete, it will replace the equivalent How To topic.
97

108
Out of the box, Page Builder comes with several content types (controls) that you can drag onto the stage to build your storefront pages, as shown below. In this topic, you will learn how to create your own content type for use within Page Builder.
@@ -23,13 +21,12 @@ An overview of the steps for creating a Page Builder content type are briefly il
2321

2422
![Creating Custom Content Types](../images/content-type-overview.png)
2523

26-
1. **Add configuration**: an XML file to setup all the other files that control the appearances and behaviors of your content type.
27-
2. **Add templates**: HTML files that define the appearance of your content types on the Admin stage (preview.html) and the storefront (master.html).
28-
3. **Add component**: a JavaScript file that define the behavior of your content type on the Admin stage (preview.js) and the storefront (master.js).
29-
4. **Add form (editor)**: a UI component (XML file) to give users the ability to add or edit content using your content type.
30-
5. **Add layout**: an XML file to add your form editor to the stage.
31-
6. **Add styles and icons**: LESS and image files (png, svg) to add specific styling and images to your content types as they appear on the Admin stage and the storefront.
32-
7. **Add frontend widget**: a JavaScript file to control the UI behavior (user interactivity) of your content type on the storefront.
24+
1. **Add configuration**: Create an XML file to setup all the other files that control the appearances and behaviors of your content type.
25+
2. **Add templates**: Create HTML files that define the appearance of your content types on the Admin stage (preview.html) and the storefront (master.html).
26+
3. **Add component**: Create a JavaScript file that define the behavior of your content type on the Admin stage (preview.js) and the storefront (master.js).
27+
4. **Add editor**: Create a UI component (XML file) and a layout to give users the ability to add or edit content using your content type.
28+
5. **Add styles**: Create LESS files to style your content types when rendered in the Admin UI and on the storefront.
29+
6. **Add frontend widget**: Create a JavaScript file to control the UI behavior (user interactivity) of your content type on the storefront.
3330

3431
## Content type files
3532

docs/create-basic-content-type/step-1-add-configuration.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
<!-- {% raw %} -->
2-
{: .bs-callout .bs-callout-warning }
3-
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
42

53
# Step 1: Add configuration
64

7-
The configuration file gives your content type its existence. It's where you set the name, display label, and references to the other files that define the appearance and behavior of your content type.
8-
9-
{: .bs-callout .bs-callout-info }
10-
Only a subset of configuration elements are described here (enough to understand the configuration file's role within a content type). For more details, refer to [Main configurations](../configurations/content-type-configuration.md) and [Additional configurations](../configurations/additional-configurations.md).
11-
12-
## Location
13-
14-
Add your configuration file here (`view/adminhtml/pagebuilder/content_type/`):
5+
The configuration file gives your content type its existence. It's where you set the name, display label, and references to the other files that define the appearance and behavior of your content type. Add it to your module in the following location (`view/adminhtml/pagebuilder/content_type/`):
156

167
![Create config file](../images/step1-add-config-file.png)
178

18-
The file name should reflect the name of your content type, using underscores to separate multi-word names as needed.
9+
The file name should reflect the name of your content type. Use underscores to separate multi-word names as needed.
1910

2011
## Example
2112

13+
{: .bs-callout .bs-callout-info }
14+
Only a subset of configuration elements are described in this example (enough to understand the configuration file's role within a content type). For more details, refer to [Main configurations](../configurations/content-type-configuration.md) and [Additional configurations](../configurations/additional-configurations.md).
15+
16+
2217
The following configuration shows the minimal requirements for defining a content type, described in the tables that follow.
2318

2419
``` xml

docs/create-basic-content-type/step-2-add-templates.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
<!-- {% raw %} -->
2-
{: .bs-callout .bs-callout-warning }
3-
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
42

53
# Step 2: Add templates
64

7-
Page Builder templates are HTML files that define the appearance of content types within both the Admin UI (using the preview.html) and the storefront UI (using the master.html). Content types cannot be rendered without these templates, so let's create the ones already specified in the `<appearance>` element of our configuration file.
8-
9-
## Location
10-
11-
Add your HTML templates here (`view/adminhtml/web/template/content-type/<content-type-name>/default/`):
5+
Page Builder templates are HTML files that define the appearance of content types within both the Admin UI (using the preview.html) and the storefront UI (using the master.html). Content types cannot be rendered without these templates, so let's create the ones already specified in the `<appearance>` element of our configuration file. Add them to your module in the following location (`view/adminhtml/web/template/content-type/<content-type-name>/default/`):
126

137
![Create config file](../images/step2-add-templates.png)
148

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<!-- {% raw %} -->
2-
{: .bs-callout .bs-callout-warning }
3-
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
4-
5-
# Step 3: Add components
62

7-
Components are JavaScript files that define the behavior of your content type within the Admin UI stage (using preview.js) and the storefront UI (using master.js).
3+
# Step 3: Add component
84

9-
## Location
10-
11-
Add your preview component here (`view/adminhtml/web/js/content-type/<content-type-name>/`):
5+
A component is a JavaScript file that defines the behavior of your content type within the Admin UI stage (using preview.js). Add it to your module in the following location (`view/adminhtml/web/js/content-type/<content-type-name>/`):
126

137
![Create config file](../images/step3-add-component.png)
148

15-
1. Add a preview.js file to ...
9+
{: .bs-callout .bs-callout-warning }
10+
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
1611

1712
<!-- {% endraw %} -->
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- {% raw %} -->
2+
3+
# Step 4: Add editor
4+
5+
The editor for your content type requires two files: a UI component form and a simple layout. The editor slides out from the right of the screen within the Admin UI to give users a way to customize your content type. Add these files to your module in the following locations:
6+
- `view/adminhtml/web/layout/`
7+
- `view/adminhtml/web/ui-component/`
8+
9+
![Create config file](../images/step4-add-editor.png)
10+
11+
12+
{: .bs-callout .bs-callout-warning }
13+
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
14+
15+
<!-- {% endraw %} -->

docs/create-basic-content-type/step-4-add-form-editor.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/create-basic-content-type/step-5-add-layout.md

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- {% raw %} -->
2+
3+
# Step 5: Add styles
4+
5+
Styles are LESS files that add specific CSS styling to content types when rendered in the Admin UI and on the storefront. Add them to your module in the following locations:
6+
7+
- `view/adminhtml/web/css/source/content-type/<content-type-name>/`
8+
- `view/frontend/web/css/source/content-type/<content-type-name>/`
9+
10+
![Create config file](../images/step6-add-styles.png)
11+
12+
13+
{: .bs-callout .bs-callout-warning }
14+
The development of this tutorial is currently **IN PROGRESS**, **INCOMPLETE**, and potentially **INCORRECT**. The expected completion time is Nov. 27.
15+
16+
<!-- {% endraw %} -->

0 commit comments

Comments
 (0)