Skip to content

Commit 878ee0a

Browse files
IBX-11366: Checkbox configuration described (#3175)
* widget configuration described * month change updated * new content moved to page_block_attributes.md * fix * Update docs/content_management/pages/page_block_attributes.md Co-authored-by: Marek Nocoń <mnocon@users.noreply.github.com> * fix --------- Co-authored-by: Marek Nocoń <mnocon@users.noreply.github.com>
1 parent 8466d7c commit 878ee0a

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

5.48 KB
Loading

docs/content_management/pages/create_custom_page_block.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ The following UDW configuration is used with the `udw_config_name` key so only a
7474

7575
For more information, see [UDW configuration](browser.md#udw-configuration).
7676

77-
7877
## Add block templates
7978

8079
A block can have different templates that you select when adding it to a page.

docs/content_management/pages/page_block_attributes.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following attribute types are available:
3535
|`embed`|Embedded content item|`udw_config_name`: name of the [Universal Discovery Widget's configuration](browser.md#add-new-configuration) |
3636
|`embedvideo`|Embedded content item|`udw_config_name`: name of the [Universal Discovery Widget's configuration](browser.md#add-new-configuration) |
3737
|`select`|Drop-down with options to select|<ul><li>`choices` lists the available options in `label: value` form</li><li>`multiple`, when set to true, allows selecting more than one option</li></ul>|
38-
|`checkbox`|Checkbox|Selects available option if `value: true`.|
38+
|`checkbox`|Checkbox|Selects available option if `value: true`. Checkbox appearance in block configuration forms [can be configured](#configure-checkbox-appearance) |
3939
|`multiple`|Checkbox(es)|`choices` lists the available options in `label: value` form.|
4040
|`radio`|Radio buttons|`choices` lists the available options in `label: value` form.|
4141
|`locationlist`|Location selection| `udw_config_name`: name of the [Universal Discovery Widget's configuration](browser.md#add-new-configuration) |
@@ -191,3 +191,23 @@ You can set the options for root or nested attribute, see the example configurat
191191
```
192192

193193
![Help message](../img/page_block_help_message.png "Help message")
194+
195+
## Configure checkbox appearance
196+
197+
For blocks with an attribute of `checkbox` type, you can change the look of the checkbox in block configuration forms.
198+
199+
You can do it by adding the `block_prefix: block_configuration_attribute_checkbox_toggle` option in the block configuration as follows:
200+
201+
``` yaml hl_lines="4 5"
202+
<attribute_identifier>:
203+
name: <name>
204+
type: checkbox
205+
options:
206+
block_prefix: block_configuration_attribute_checkbox_toggle
207+
```
208+
209+
This setting changes the checkbox appearance to a toggle widget.
210+
211+
![Toggle widget](toggle_widget.png)
212+
213+
If you remove the above setting from the configuration, the attribute reverts to the default checkbox appearance.

0 commit comments

Comments
 (0)