LayoutColumns
Last updated
Last updated
LayoutColumns
represent a column in a user defined . LayoutColumns
are always related to a and may contain many LayoutableElements
.
LayoutableElements
are different models that can be assigned to a LayoutColumn
via the intermidiate relation. Currently these are mainly .
layoutColumn
layoutRow
Belongs to
layout_row_id
layoutableElements
Has many
layoutColumnLayoutElement.layout_column_id
formFields
Morphy to many
Sortable
SoftDeletes
Get a list of all LayoutColumns
available in the system.
Definition
GET
/api/layouts/columns
Example Request
Example Response
Show a single LayoutColumn
by id
.
Definition
GET
/api/layouts/columns/{id}
Example Request
Example Response
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.
width
- The maximum usable width in a row is 12
. Thus given a column can have a maximum width of 12
if it's a single column. When passing a different value than null
(= flexible) the maximum value is calculated by substracting the cumulated width values of already existing columns from 12
.
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 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 an existing LayoutColumn
by id
.
Definition
DELETE
/api/layouts/columns/{id}
Example Request
Example Response
The index of the LayoutColumn
related to the .
The index of the LayoutColumn
related to the .