The sortOrder-attribute with the value of 10 defines the position of the tab in the list of all tabs when rendered. During the rendering process, the CSS class a-custom-css-class-to-style-this-tab will be applied on the HTML element that was created for this tab. As the translate-attribute is defined and references the label, the label-node is translatable. The snippet above creates a new tab with the identifier A_UNIQUE_ID. ![]() The following code snippet demonstrates the creation of a new tab with example data. High numbers push the section to the bottom of the page low numbers push the section to the top.Īdds a defined CSS class to the rendered tab HTML element.Ī -Tag can have the following child: Nodeĭefines the label that is displayed in the frontend. Provide label to make the label translatable.ĭefines the sort order of the section. Tab attribute referenceĪ -Tag can have the following attributes: Attributeĭefines the identifier that is used referencing the section.ĭefines the field that should be translatable. TabsĪ -Tag references to either an existing or a new tab in the system configuration. As mentioned, each group can have one or more fields. You can also use a group to add a general description for the following fields. A section contains one or more groups.Įach group lists one or more fields. ![]() Each tab can contain one or more sections, which can also be referenced as submenus. Tabs are used to split different configuration areas semantically. The red squares mark the different types that are defined in the system.xml file: The following screenshot displays the Commerce 2 System Configuration in the Admin backend. The following section describes the relationship between tabs, sections, groups, and fields. In the system.xml file, it is possible to define four different types of entities, which are related to each other. If you want instant *XSD validation in your IDE, you can run bin/magento dev:urn-catalog:generate.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |