Aktionen
GX-Feature #70548
geschlossenErstellen einer Repeater-Option in SE4 / Create a repeater option in SE4
Status:
Erledigt
Priorität:
Normal
Zugewiesen an:
Alexandre Ataides
Kategorie:
StyleEdit 4
Zielversion:
% erledigt:
0%
Geschätzter Aufwand:
200.00 h
Steps to reproduce:
Betroffene Versionen:
Unbestimmt
Release Notes Langtext:
Es wurde eine sogenannte Repeater-Option zu StyleEdit 4 hinzugefügt, die als Grundlage für verschiedene neue Widgets dient
Beschreibung
A repeater option would be handy when creating new widgets like Tabs, Carousel Images, Accordions, and so on.
The repeater option should allow us to create a group of options (Textbox, Image, Numberbox, Checkbox, etc.) just so we iterate through these options and "easily" show them in SE4.
In the example below, there is an array of fields
, which contains the textbox
and longtextbox
options.
// Example of a widget.json file using the repeater ... "description" : "tabsWidget.description", "cache" : 0, "version" : "1.0.0", "displayConfig" : "modal", "fieldsets" : [ { "title" : "tabsWidget.options.content.title", "options" : [ { "id" : "repeater", "type" : "repeater", "label" : "Tabs", "attributes" : { "min" : 1, "max" : 4, "itemLabel": "Tab". "addMoreLabel" : "Add Tab", "canSetDefaultActiveIndex" : true, "defaultActiveIndex": 0 }, "fields" : [ { "id": "title", "type": "textbox", "label": "Title", "translatable": true, "default": { "en": "", "de": "" } }, { "id" : "content", "translatable": true, "type" : "longtextbox", "label" : "tabsWidget.options.text.label", "attributes" : { "placeholder" : "tabsWidget.options.text.placeholder" }, "default" : { "en" : "", "de" : "" }, } ], "default" : [ [ { "id": "my-title-id", "type": "textbox", "label": "Title", "translatable": true, "repeaterField": "title", "default": { "en": "", "de": "" } }, { "id": "my-title-content", "type": "longtextbox", "label": "tabsWidget.options.text.label", "translatable": true, "repeaterField": "content", "attributes": { "placeholder": "tabsWidget.options.text.placeholder" }, "default": { "en": "", "de": "" } } ] ] } ] }, ...
As to test a Widget is needed it's better if only a code review is done, then we test the RepeaterOption
in one of the new widgets: Tabs, Carousel, Accordion, etc
.
Aktionen