Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/content_management/img/help_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 33 additions & 1 deletion docs/content_management/pages/page_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

| Setting | Description |
|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | Name of the block used in the Page Builder interface. Translatable using the `ibexa_page_fieldtype` translation domain. |
| `name` | Name of the block used in the Page Builder interface. Translatable using the `ibexa_page_fieldtype` translation domain. Also accepts a [`help` key](#block-name-and-help-text) that adds a helper text under the **Name** field in the block configuration form. |

Check notice on line 24 in docs/content_management/pages/page_blocks.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/content_management/pages/page_blocks.md#L24

[Ibexa.ByUsing] Prefer 'by using' or 'with' to plain 'using'.
Raw output
{"message": "[Ibexa.ByUsing] Prefer 'by using' or 'with' to plain 'using'.", "location": {"path": "docs/content_management/pages/page_blocks.md", "range": {"start": {"line": 24, "column": 97}}}, "severity": "INFO"}
| `category` | Category in the Page Builder **Page blocks** toolbox that the block is shown in. Translatable using the `ibexa_page_fieldtype` translation domain. |
| `thumbnail` | Thumbnail used in the Page Builder **Page blocks** toolbox. |
| `views` | Available [templates for the block](#block-templates). |
Expand All @@ -40,6 +40,38 @@

For a full example of block configuration, see [Create custom Page block](create_custom_page_block.md).

### Block name and help text

The `name` setting accepts either a single translation key, a hard coded string of text that won't be translated, or an object with `text` and `help` property keys.

Check notice on line 45 in docs/content_management/pages/page_blocks.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/content_management/pages/page_blocks.md#L45

[Ibexa.Passive] Try to avoid passive tense, when possible.
Raw output
{"message": "[Ibexa.Passive] Try to avoid passive tense, when possible.", "location": {"path": "docs/content_management/pages/page_blocks.md", "range": {"start": {"line": 45, "column": 100}}}, "severity": "INFO"}
Both `text` and `help` are translatable using the `ibexa_page_fieldtype` translation domain.

Check notice on line 46 in docs/content_management/pages/page_blocks.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/content_management/pages/page_blocks.md#L46

[Ibexa.ByUsing] Prefer 'by using' or 'with' to plain 'using'.
Raw output
{"message": "[Ibexa.ByUsing] Prefer 'by using' or 'with' to plain 'using'.", "location": {"path": "docs/content_management/pages/page_blocks.md", "range": {"start": {"line": 46, "column": 28}}}, "severity": "INFO"}

Scalar form:

``` yaml
Comment thread
julitafalcondusza marked this conversation as resolved.
ibexa_fieldtype_page:
blocks:
my_block:
name: my_block.name.key
```

Structured form with a helper text:

```yaml
ibexa_fieldtype_page:
blocks:
my_block:
name:
text: my_block.name.key
help: my_block.name.help.key
```

- `text` - corresponds to the block name.
- `help` - is an optional translation key whose translation is rendered as a helper text under the **Name** field in the block configuration form.

Check notice on line 69 in docs/content_management/pages/page_blocks.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/content_management/pages/page_blocks.md#L69

[Ibexa.Passive] Try to avoid passive tense, when possible.
Raw output
{"message": "[Ibexa.Passive] Try to avoid passive tense, when possible.", "location": {"path": "docs/content_management/pages/page_blocks.md", "range": {"start": {"line": 69, "column": 61}}}, "severity": "INFO"}
Comment thread
julitafalcondusza marked this conversation as resolved.

![Help text](help_text.png)

The same format is available for [React App blocks](react_app_block.md).

### Overwriting existing blocks

You can overwrite the following properties in the existing blocks:
Expand Down
2 changes: 1 addition & 1 deletion docs/content_management/pages/react_app_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Each configured React app block has an identifier and the following settings:

| Setting | Description |
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | Name of the block used in the Page Builder interface. |
| `name` | Name of the block used in the Page Builder interface. Also accepts a [`help` key](page_blocks.md#block-name-and-help-text) that adds a helper text under the **Name** field in the block configuration form. |
| `category` | Category in the Page Builder **Page blocks** toolbox that the block is shown in. |
| `thumbnail` | Thumbnail used in the Page Builder **Page blocks** toolbox. |
| `component` | React App Component name used in `assets/page-builder/react/blocks` directory. |
Expand Down
Loading