diff --git a/docs/content_management/img/help_text.png b/docs/content_management/img/help_text.png new file mode 100644 index 0000000000..b69e2cdcb5 Binary files /dev/null and b/docs/content_management/img/help_text.png differ diff --git a/docs/content_management/pages/page_blocks.md b/docs/content_management/pages/page_blocks.md index b43e761619..ce12cd083a 100644 --- a/docs/content_management/pages/page_blocks.md +++ b/docs/content_management/pages/page_blocks.md @@ -21,7 +21,7 @@ Each configured block has an identifier and the following settings: | 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. | | `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). | @@ -40,6 +40,38 @@ For example: 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. +Both `text` and `help` are translatable using the `ibexa_page_fieldtype` translation domain. + +Scalar form: + +``` yaml +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. + +![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: diff --git a/docs/content_management/pages/react_app_block.md b/docs/content_management/pages/react_app_block.md index e44cd9501d..fc1c6fb00f 100644 --- a/docs/content_management/pages/react_app_block.md +++ b/docs/content_management/pages/react_app_block.md @@ -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. |