Skip to content

Commit 443e7bc

Browse files
committed
Merge branch 'devdocs-develop' into MAGEDOC-3427-configuration
# Conflicts: # docs/reference/configurations.md
2 parents 6912cb1 + 6849301 commit 443e7bc

23 files changed

+471
-129
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ And the same three Quote controls are shown rendered here on a mock testimonial
1616

1717
## Quote module
1818

19-
As with most things in Magento, content types for Page Builder are housed in modules. The convention for naming modules that are solely dedicated to Page Builder, such as our Quote content type, is to prefix all the content type name with `PageBuilder`. This helps visually group content type modules within your vendor directory. Of course, this convention doesn't apply If you are adding a content type as part of an existing module.
19+
As with most things in Magento, content types for Page Builder are housed in modules. The convention for naming modules that are solely dedicated to Page Builder, such as our Quote content type, is to prefix all content type names with `PageBuilder`. This helps visually group content type modules within your vendor directory. Of course, this convention does not apply if you are adding a content type as part of an existing module.
2020

2121
Applying this convention to the module for our Quote content type, we get the name `PageBuilderQuote`, and can set up our module as shown here:
2222

@@ -28,7 +28,7 @@ After registering your module (`bin/magento setup:upgrade`) you will be ready to
2828

2929
The steps for creating the Quote content type are illustrated and described below. The reality is not quite this linear, but these steps do represent the basic phases and flow for building new Page Builder content types.
3030

31-
![Creating Custom Content Types](../images/content-type-overview.png)
31+
![Creating Custom Content Types](../images/content-type-overview.svg)
3232

3333
1. **Add configuration**: Create an XML file to define your content type and reference the other files that control the appearance and behavior of your content type.
3434
2. **Add templates**: Create HTML templates that define the appearance of your content types on the Admin stage (`preview.html`) and the storefront (`master.html`).
Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
11
# Overview
22

3-
This topic is currently under development. It will be completed by the GA release of Page Builder.
3+
One of quickest ways to customize Page Builder is by changing how _existing_ content types look and behave. End-users can already edit Page Builder's content types in several ways. But sometimes your end-users will want to change the structure or modify properties that do not exist on a given content type. In those cases, you can extend an existing content type by customizing its existing _appearance_ or adding a new _appearance_.
4+
5+
## Appearances
6+
7+
An **appearance** is an XML element in a content type's configuration file that lets you modify existing properties, templates, styles, and form fields, or create new ones. In other words, all Page Builder content types (existing or custom) are extended through appearances.
8+
9+
Many of Page Builder's content types have only one `appearance` element. These include the Heading, Text, Image, Video, Tabs, and more. Other content types have several appearances. For example, the Banner content type has four appearances, as shown here:
10+
11+
![banner-appearances](../images/banner-appearances.png)
12+
13+
Page Builder defines these appearances in the Banner's configuration file (`Magento/PageBuilder/view/adminhtml/pagebuilder/content_type/banner.xml`), as shown here:
14+
15+
```
16+
<appearances>
17+
<appearance name="collage-left"...>
18+
<appearance name="collage-centered"...>
19+
<appearance name="collage-right"...>
20+
<appearance name="poster" default="true" ...>
21+
</appearances>
22+
```
23+
24+
Within each `appearance` element, you can change content types in the following ways:
25+
26+
- Add new style properties.
27+
- Add or change templates.
28+
- Add to or change existing forms.
29+
- Add new attributes.
30+
- Move data between elements.
31+
32+
## Banner extension tutorial
33+
34+
In this tutorial, you will extend the Banner content type by adding a new `max-height` style property to two of the Banner's existing appearances: `collage-left` and `collage-right`.
35+
36+
![Page Builder Banner menu item](../images/extend-banner-menu.png){:width="815px" height="auto"}
37+
38+
## Banner extension steps
39+
40+
These steps show the basic pattern for adding style properties using existing appearances to extend a content type:
41+
42+
![Creating Custom Content Types](../images/extension-steps-overview.svg)
43+
44+
1. **Create an extension module**: Create a basic module for your Banner extensions.
45+
2. **Extend appearances**: Extend the existing content type's configuration file by customizing an existing appearance with new style properties.
46+
3. **Extend forms**: Extend the existing content type's UI component form by adding new form fields and changing defaults for existing fields.
47+
48+
## Next
49+
50+
[Step 1: Create an extension module](step-1-create-extension-module.md)
51+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Step 1: Create an extension module
2+
3+
Appearance extensions for Page Builder are implemented using modules. In this step, we will create an empty module so we can add our appearance and form extensions in steps 2 and 3, as shown here:
4+
5+
![Completed extension file structure](../images/extension-file-structure-complete.png){:width="826px" height="auto"}
6+
7+
## Add directory structure
8+
9+
To create a module for the Banner extensions, name your vendor directory `Example` and name your module `PageBuilderExtensionBanner`, as shown here:
10+
11+
![Minimum extension module structure](../images/banner-extension-file-structure.png){:width="530px" height="auto"}
12+
13+
The convention for naming extension modules is to prefix your extension of an existing content type with `PageBuilderExtension`, followed by the name of the content type. This is not a required convention, but we find that it helps visually group extension modules within your vendor directory.
14+
15+
## Add module file
16+
17+
Your module file should look like this:
18+
19+
```xml
20+
<?xml version="1.0"?>
21+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
22+
<module name="Example_PageBuilderExtensionBanner" setup_version="1.0.0">
23+
<sequence>
24+
<module name="Magento_PageBuilder"/>
25+
</sequence>
26+
</module>
27+
</config>
28+
```
29+
30+
## Add registration file
31+
32+
Your registration file should look like this:
33+
34+
```php
35+
<?php
36+
37+
use \Magento\Framework\Component\ComponentRegistrar;
38+
39+
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Example_PageBuilderExtensionBanner', __DIR__);
40+
```
41+
42+
## Install your module
43+
44+
From your Magento root directory, use `bin/magento setup:upgrade` to install and enable your module.
45+
46+
## Next
47+
48+
[Step 2: Extend appearances](step-2-extend-appearances.md)
49+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Step 2: Extend appearances
2+
3+
In progress. To be officially published on 3/26
4+
5+
6+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Step 3: Extend forms
2+
3+
In progress. To be officially published on 3/26
4+

docs/getting-started/install-pagebuilder-examples.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,50 @@
11
# Install Page Builder Examples
22

3-
You can find the code examples used, and referred to, within this documentation on GitHub in the [pagebuilder-examples repo](https://github.com/magento-devdocs/pagebuilder-examples). This repo contains two types of examples:
3+
You can find the Page Builder examples used in this documentation on GitHub in the [pagebuilder-examples repo](https://github.com/magento-devdocs/pagebuilder-examples). This repo contains two types of examples:
44

55
- Fully functional modules
66
- Files for how-to topics
77

88
## Fully functional modules
99

10-
The following custom content type modules are here for you to download and install so you can learn by example:
10+
To learn by example, the [Example directory](https://github.com/magento-devdocs/pagebuilder-examples/tree/master/Example) on the repo provides the following custom content-type modules for you to download and install.
1111

1212
- **[PageBuilderQuote](https://github.com/magento-devdocs/pagebuilder-examples/tree/master/Example/PageBuilderQuote)**—This module shows you how to use a simple content type to stylize quotations for things like customer testimonials. This is the completed module featured in the [content type tutorial](../create-custom-content-type/overview.md).
1313
- **[PageBuilderGrid](https://github.com/magento-devdocs/pagebuilder-examples/tree/master/Example/PageBuilderGrid)**—This module shows you how to create a content type to rebuild the Magento Luma home page using a grid structure with grid items.
1414
- **[PageBuilderFaq](https://github.com/magento-devdocs/pagebuilder-examples/tree/master/Example/PageBuilderFaq)**—This module shows you how to create a content type for an FAQ page that uses an accordion for the questions and answers.
1515

16+
## Installation
17+
18+
Assuming you have Page Builder 1.0.0 already installed, you can install the example modules as follows:
19+
20+
1. Clone the pagebuilder-examples repo:
21+
22+
```bash
23+
git clone https://github.com/magento-devdocs/pagebuilder-examples
24+
```
25+
26+
2. Navigate to your `<Magento2_installation>/app/code/` directory.
27+
28+
3. Copy or symlink the `Example` directory from your local `pagebuilder-examples` clone into your `app/code/` directory.
29+
30+
**To Symlink**:
31+
```bash
32+
ln -s <Relative_route_to_cloned_Example_directory>
33+
```
34+
35+
![Examples installation directory](../images/examples-install-location.png)
36+
37+
4. Enable the modules using the `setup:upgrade` command:
38+
39+
```bash
40+
bin/magento setup:upgrade
41+
```
42+
43+
5. Navigate to a Page Builder instance to ensure the example content types appear in the Page Builder panel, as shown here:
44+
45+
![Content type examples shown in panel](../images/example-content-types.png)
46+
47+
1648
## Files for how-to topics
1749

1850
The how-to directories in the repo correspond to the how-to topics in this documentation. They provide the files and code changes required by the how-to topic in order to add the given feature to the `PageBuilderQuote` module.
Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
# Install Page Builder
22

3-
How you install the pre-release version of Page Builder depends on whether you are a member of the Early Adopters Program (EAP):
3+
Page Builder is automatically installed with Magento Commerce 2.3.1. There is nothing else you need to do. However, If you want to contribute to the Page Builder code or documentation, you can use the GitHub installation as follows.
44

5-
- **All Partners** (not EAP members) must use the [GitHub installation](#githubInstructions).
6-
- **EAP Members** can install using the [Composer installation](#composerInstallation).
5+
## GitHub installation for Contributors
76

8-
## Prerequisite for both installations
7+
Before installing Page Builder for making contributions, make sure you have the following prerequisites:
98

10-
Magento Commerce 2.3+ -- Use the installation instructions from the [DevDocs installation guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
11-
12-
## **All Partners**: GitHub Installation {#githubInstructions}
13-
14-
Partners who are not members of the Early Adopters Program (EAP) must install the pre-release version of Page Builder by cloning the Page Builder GitHub repository (https://github.com/magento/magento2-page-builder) into a development instance of Magento.
15-
Before installing Page Builder, make sure you have:
16-
17-
* A local development installation of Magento Commerce 2.3+
18-
* Access to the Page Builder repository
19-
* [npm package manager](https://www.npmjs.com/get-npm)
9+
- A local development installation of Magento Commerce 2.3.1 -- Use the installation instructions from the [DevDocs installation guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
10+
- Access to the private Page Builder repository
11+
- [npm package manager](https://www.npmjs.com/get-npm)
2012

2113
1. Clone the Page Builder repos into the root directory of your Magento Commerce 2.3+ installation:
2214

@@ -31,9 +23,9 @@ Before installing Page Builder, make sure you have:
3123
php dev/tools/build-ee.php --command=link --ee-source="magento2-page-builder" --ce-source="."
3224
php dev/tools/build-ee.php --command=link --ee-source="magento2-page-builder-ee" --ce-source="."
3325
```
34-
26+
3527
The results should look like this:
36-
28+
3729
![Symlinks to Page Builder](../images/symlinked-pagebuilder.png)
3830

3931
3. Enable the Page Builder module using the following command:
@@ -57,45 +49,3 @@ cd pagebuilder && npm install
5749
```
5850

5951
After installing the npm packages, you can run `npm run start`. This command watches for changes to your TypeScript files, compiles, and checks for errors.
60-
61-
## **EAP Participants Only**: Composer Installation {#composerInstallation}
62-
63-
To use the Composer installation described below, you must be an active member in the Page Builder EAP program and have submitted your MAGEID to get access to the Page Builder Composer packages through `repo.magento.com`.
64-
If you are experiencing problems _as an EAP member_, please contact us at `pagebuilderEAP@adobe.com`.
65-
66-
{: .bs-callout .bs-callout-info }
67-
If you already have Magento 2.3.0 or Page Builder installed, clear your composer cache (`composer clearcache`) before you install the latest packages.
68-
69-
1. Ensure your composer has `minimum-stability` set to `beta`:
70-
71-
```bash
72-
composer config minimum-stability beta
73-
```
74-
75-
2. Navigate to the root of the project and require the `magento/module-page-builder-commerce` package:
76-
77-
```bash
78-
composer require magento/page-builder-commerce:^1.0.0
79-
```
80-
81-
3. Enable the module within Magento:
82-
83-
``` bash
84-
bin/magento setup:upgrade
85-
```
86-
87-
4. Activate Page Builder from the Admin UI as described in [Activate Page Builder](../how-to/how-to-deactivate-pagebuilder.md).
88-
89-
### Updating Composer installation
90-
91-
You can install updates by completing a `composer update` within your project.
92-
93-
### Composer installation issues
94-
95-
If you run into the following issue:
96-
97-
```shell
98-
Could not find a matching version of package magento/page-builder-commerce. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
99-
```
100-
101-
Please ensure the credentials you're using to connect with `repo.magento.com` belong to the MAGEID you provided when you signed up to the EAP program.

docs/how-to/how-to-add-appearance.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# How to add an appearance
22

3+
This topic describes how to add a new appearance to a content type so that you can give end-users the custom features they require when creating content.
4+
5+
![How to add an appearance](../images/how-to-add-appearance.svg)
6+
7+
## Step 1: Add appearance to config file
8+
39
In progress...

docs/how-to/how-to-add-storefront-widget.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# How to add a storefront widget
22

3-
A storefront widget is a JavaScript component that handles the behavior of a content type after Page Builder renders it on the storefront.
4-
For example, the Tabs and Sliders have their own storefront widgets to handle the end-user's tapping of tabs and swiping of slides on the storefront.
5-
However, Page Builder also executes storefront widgets on the Admin stage for block and dynamic block content types.
6-
This allows end-users to preview how Page Builder will render the blocks and dynamic blocks on the storefront.
3+
A storefront widget is a JavaScript component that handles the behavior of a content type after Page Builder renders it on the storefront. For example, the Tabs and Sliders have their own storefront widgets to handle the end-user's tapping of tabs and swiping of slides on the storefront.
4+
5+
However, Page Builder also executes storefront widgets on the Admin stage for block and dynamic block content types. This allows end-users to preview how Page Builder will render the blocks and dynamic blocks on the storefront.
76

87
Adding a storefront widget to your content type is a simple two-step process:
98

51.6 KB
Loading

0 commit comments

Comments
 (0)