Type key: layout_row. Renders a row of one to three columns and places its child nodes side by side. In the editor, see Multi-column layouts.
A structural node: it sits at the page root, and its children point back to it through parent_node_id and column_index. Layout rows and columns covers the placement rules.
Meta fields
Section titled “Meta fields”The meta fields of this node type are listed in the request body of Replace the draft document, under pages › nodes, in the layout_row tab.
Example
Section titled “Example”{ "public_id": "pQ02", "name": "Travel", "type": "normal", "nodes": [ { "public_id": "nRow", "sort_order": 1, "type": "layout_row", "meta": { "column_count": 2 } }, { "public_id": "nCty", "parent_node_id": "nRow", "column_index": 0, "sort_order": 1, "type": "dropdown", "meta": { "question": "<span>Country</span>", "placeholder": "Choose a country", "select_options_data": [ { "value": "de", "label": "Germany" }, { "value": "nl", "label": "Netherlands" }, { "value": "pl", "label": "Poland" } ], "validation": { "required": true } } }, { "public_id": "nPhn", "parent_node_id": "nRow", "column_index": 1, "sort_order": 1, "type": "phone_number_input", "meta": { "question": "<span>Phone number</span>", "validation": { "required": false } } }, { "public_id": "nNxt", "sort_order": 2, "type": "actions", "meta": { "label": "Next" } } ]}Defaults and rules
Section titled “Defaults and rules”column_countaccepts1to3and defaults to2.column_0_alignment,column_1_alignment, andcolumn_2_alignmentalign each column vertically:top,middle, orbottom.- Choose the row’s
public_idyourself so its children can reference it in the same write. Each child setsparent_node_idto that ID and acolumn_indexbelowcolumn_count. - A row needs at least one child, a three-column row needs content in every column, and rows cannot be nested.
sort_ordercounts separately in each column.- At publish, a row whose children are all hidden is stripped, and a three-column row that loses a whole column contracts to two. See Hidden nodes.