Attribute_layout Widget

The attribute_layout widget prints the content of a certain attribute.

This widget is only configured through layout and its sub elements and needs only a simple widget registration. The following example shows how the attributes first_name, last_name, postal_code and city can be arranged in a layout using the default width, which results in a line break after each attribute.

"layout": [{
  "id": "address",
  "layout": [
    {
      "layout": [
        {
          "attribute": "first_name"
        },
        {
          "attribute": "last_name"
        }
      ]
    },
    {
      "layout": [
        {
          "attribute": "postal_code"
        },
        {
          "attribute": "city"
        }
      ]
    }
  ]
}],
  "widgets" : {
    "address" : {
      "type" : "attribute_layout"
    }
  }

This example result in the following view of the billing address at an order, in which the grid distributes the cells automatically.

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.