Skip to content

Commit cdebf03

Browse files
committed
MC-4272: Update content type docs
Rename customization section to configuration so we can group all the configuration files together
1 parent 441c5a8 commit cdebf03

12 files changed

+52
-21
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,18 @@ We offer one method for installing PageBuilder:
3131
2. [Install Page Builder](docs/getting-started/install-pagebuilder.md)
3232
3. [Activate Page Builder](docs/getting-started/activate-pagebuilder.md)
3333

34-
### Customizations
35-
36-
* [Block chooser](docs/customizations/block-chooser.md)
37-
* [Full-width page layouts](docs/customizations/full-width-page-layouts.md)
38-
* [Responsive layouts](docs/customizations/responsive-layouts.md)
39-
* [Storefront customization](docs/customizations/storefront-customization.md)
40-
* [Visual selects](docs/customizations/visual-selects.md)
41-
* [Additional data configuration](docs/customizations/additional-data-configuration.md)
42-
* [Product conditions](docs/customizations/product-conditions.md)
43-
* [Server-side rendered previews](docs/customizations/server-side-rendered-previews.md)
34+
### Configurations
35+
36+
* [Content type configuration](docs/configurations/content-type-configuration.md)
37+
* [Additional configurations](docs/configurations/additional-configurations.md)
38+
* [Panel configurations](docs/configurations/panel-configurations.md)
39+
* [Block chooser configuration](docs/configurations/block-chooser-configuration.md)
40+
* [Full-width page layout configuration](docs/configurations/full-width-page-layout-configuration.md)
41+
* [Responsive layout configuration](docs/configurations/responsive-layout-configuration.md)
42+
* [Storefront configuration](docs/configurations/storefront-configuration.md)
43+
* [Selector configuration](docs/configurations/selector-configuration.md)
44+
* [Product conditions configuration](docs/configurations/product-conditions-configuration.md)
45+
* [Server-side rendered previews](docs/configurations/server-side-rendered-previews.md)
4446

4547
### How Tos
4648

@@ -57,7 +59,6 @@ We offer one method for installing PageBuilder:
5759
* [Architecture](docs/reference/architecture.md)
5860
* [Events](docs/reference/events.md)
5961
* [Knockout bindings](docs/reference/knockout-bindings.md)
60-
* [Configuration](docs/reference/configuration.md)
6162
* [Master format](docs/reference/master-format.md)
6263

6364
### Migration

docs/customizations/customize-panel.md renamed to docs/configurations/panel-configurations.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ By default, the Page Builder panel has four groups (Layout, Elements, Media, Add
66

77
![Panel menu](../images/panel-horizontal-default.png)
88

9-
You can customize the panel menu in three ways:
9+
You can customize the panel menu in four ways:
1010

1111
1. Rename panel groups.
12-
2. Add new panel group.
13-
3. Add your content type to a panel group.
12+
2. Reorder panel groups.
13+
2. Add new panel groups.
14+
3. Add content types to different panel groups.
1415

15-
## Rename the panel groups
16+
## Rename panel groups
1617

1718
To rename the panel groups, you need to override the defaults configured in the Page Builder `group.xml` file as follows:
1819

@@ -53,7 +54,25 @@ To rename the panel groups, you need to override the defaults configured in the
5354
</config>
5455
```
5556

56-
## Add a new panel group
57+
## Reorder panel groups
58+
59+
To reorder panel groups, you need to override the default `sortOrder`s applied to the existing panel groups:
60+
61+
```xml
62+
<?xml version="1.0"?>
63+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/group.xsd">
64+
<group name="layout" translate="label" sortOrder="30" label="Structure"/>
65+
<group name="elements" translate="label" sortOrder="20" label="Form Controls"/>
66+
<group name="media" translate="label" sortOrder="10" label="Visual Controls"/>
67+
<group name="add_content" translate="label" sortOrder="1" label="Content"/>
68+
</config>
69+
```
70+
71+
In this example, the `sortOrder`'s of the groups have been reversed from their defaults. The result looks like this:
72+
73+
![Reorder panel groups](../images/panel-reorder-groups.png)
74+
75+
## Add new panel groups
5776

5877
To add a new panel group, add a new `<group>` element in your module's `group.xml` file with a unique `name` as shown here:
5978

@@ -70,28 +89,29 @@ The result shows the new group (My Controls) positioned at the top of the panel
7089

7190
Now to populate the new and existing groups with content types.
7291

73-
## Add a content type to a panel group
92+
## Add content types to different panel groups
7493

75-
To do this, set your configuration's `group` attribute to the `<group>` element's name. For example, to add your content type to the Layout group,
94+
To add content types to other panel groups, set your configuration's `group` attribute to the new `<group>` element's name. For example, to add your content type to a new group called My Controls,
7695

7796
```xml
7897
<group name="my_controls" translate="label" sortOrder="0" label="My Controls"/>
7998
```
8099

81-
Specify "my_controls" as the value of the `group` attribute in your configuration file, as shown here:
100+
You specify "my_controls" as the value of the `group` attribute in your configuration file, as shown here:
82101

83102
```xml
84103
<?xml version="1.0"?>
85104
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/content_type.xsd">
86105
<type name="bestcontrolever"
87106
label="Best Control Ever"
88107
group="my_controls"
89-
...>
108+
...
109+
>
90110
```
91111

92112
![Group with content type](../images/group-with-content-type.png)
93113

94-
The same technique applies to adding a content type to an existing panel groups: `layout`, `elements`, `media`, and `add_content` as shown here:
114+
The same technique applies when you want to add a new content type (or move existing content types) to one of the default groups: `layout`, `elements`, `media`, and `add_content` as shown here:
95115

96116
```xml
97117
<group name="layout" translate="label" sortOrder="1" label="Layout"/>
@@ -100,4 +120,14 @@ The same technique applies to adding a content type to an existing panel groups:
100120
<group name="add_content" translate="label" sortOrder="30" label="Add Content"/>
101121
```
102122

123+
```xml
124+
<?xml version="1.0"?>
125+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/content_type.xsd">
126+
<type name="bestcontrolever"
127+
label="Best Control Ever"
128+
group="elements"
129+
...
130+
>
131+
```
132+
103133
<!-- {% endraw %} -->

0 commit comments

Comments
 (0)