LayoutColumns
Introduction
LayoutColumns
represent a column in a user defined Layout. LayoutColumns
are always related to a LayoutRow and may contain many LayoutableElements
.
LayoutableElements
are different models that can be assigned to a LayoutColumn
via the LayoutColumnLayoutElements intermidiate relation. Currently these are mainly FormFields.
Model Definition
Alias
layoutColumn
Relations
layoutRow
Belongs to
layout_row_id
layoutableElements
Has many
layoutColumnLayoutElement.layout_column_id
formFields
Morphy to many
Traits
Sortable
SoftDeletes
List
Get a list of all LayoutColumns
available in the system.
Definition
GET
/api/layouts/columns
Example Request
Example Response
Show
Show a single LayoutColumn
by id
.
Definition
GET
/api/layouts/columns/{id}
Example Request
Example Response
Create
Creates a new LayoutColumn
Definition
POST
/api/layouts/columns
Request Keys
title
string
null
The title for the LayoutColumn
.
layout_row_id
*
integer
-
The LayoutRow
this LayoutColumn
belongs to.
width
integer
null
The displayed column width.
sort_number
integer
Current highest +1
Keys with *
are required.
Advanced Key-Specifications
width
- The maximum usable width in a row is12
. Thus given a column can have a maximum width of12
if it's a single column. When passing a different value thannull
(= flexible) the maximum value is calculated by substracting the cumulated width values of already existing columns from12
.
Example: There are two LayoutColumns
existing with a width
of 4
and 6
. The maximum width for a third column would be 2
then.
Example Request
Example Response
Update
Update an existing LayoutColumn
by id
.
Definition
PUT
/api/layouts/columns/{id}
Request Keys
title
string
-
The title for the LayoutColumn
.
layout_row_id
integer
-
The LayoutRow
this LayoutColumn
belongs to.
width
integer
-
The displayed column width.
sort_number
integer
-
Example Request
Example Response
Delete
Delete an existing LayoutColumn
by id
.
Definition
DELETE
/api/layouts/columns/{id}
Example Request
Example Response
Last updated