Skip to content

Commit 6ba779a

Browse files
authored
Merge pull request #8 from magento-devdocs/MC-6271
MC-6271: Add docs for content type forms
2 parents 330537c + 9b4c7e6 commit 6ba779a

File tree

6 files changed

+337
-116
lines changed

6 files changed

+337
-116
lines changed

docs/create-basic-content-type/step-3-add-components.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,4 @@ As mentioned previously, our Quote content type has no need for a master compone
181181
## Next
182182
183183
[Step 4: Add form](step-4-add-form.md)
184+

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

Lines changed: 308 additions & 101 deletions
Large diffs are not rendered by default.

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

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,38 @@ The development of this tutorial is currently **IN PROGRESS**.
55

66
***
77

8-
Like in the rest of Magento, you can use LESS files to style your content types in the Admin UI and on the storefront (frontend).
8+
In this step, we will create CSS styles (using LESS) so that we can give end-users different options for customizing the Quote's appearance in the Admin and on the storefront.
99

10-
## Configuration
10+
## About styles
1111

12-
CSS classes from your LESS files are typically used within your HTML templates. However, you can also allow end-users to apply CSS classes directly to your content types from within the editor, using the CSS Classess input field as shown here:
12+
Page Builder specifies two ways to
13+
14+
Describe how the Quote content type combines the usage of style files from end-user specification of classes in forms, to non-interactive styles used in the templates.
15+
16+
And more discussion of the `pagebuilder-content-type` style.
17+
18+
## Style conventions
19+
20+
Add your LESS files here:
21+
22+
- For Admin UI previews: `view/adminhtml/web/css/source/content-type/example-quote/`
23+
- For storefront display: `view/frontend/web/css/source/content-type/example-quote/`
24+
25+
![Create config file](../images/step6-add-styles.png)
26+
27+
28+
29+
**Discuss the need for naming ``_module.less` file in the `source` directory and then how the styles are compiled and imported together and where the combined styles ultimately end up.**
30+
31+
32+
33+
## Style configuration
34+
35+
CSS classes from your LESS files are typically used within your HTML templates. However, you can also allow end-users to apply CSS classes to your content types from within the form editor, using the CSS Classess input field as shown here:
1336

1437
![Create config file](../images/css-classes-input-field.png)
1538

16-
To display this field within your content type's editor, add the `<css>` element to the `main` element of your configuration:
39+
1740

1841
```xml
1942
<elements>
@@ -23,16 +46,6 @@ To display this field within your content type's editor, add the `<css>` element
2346
</element>
2447
</elements>
2548
```
26-
27-
## Location
28-
29-
Add your LESS files here:
30-
31-
- For Admin UI previews: `view/adminhtml/web/css/source/content-type/<content-type-name>/`
32-
- For storefront display: `view/frontend/web/css/source/content-type/<content-type-name>/`
33-
34-
![Create config file](../images/step6-add-styles.png)
49+
## Quote LESS files
3550

3651
## Create LESS files
37-
38-
In this example...

docs/images/custom-form-fields.png

26.9 KB
Loading

docs/images/pagebuilder_base_form.png

56.1 KB
Loading
Loading

0 commit comments

Comments
 (0)