-
Notifications
You must be signed in to change notification settings - Fork 5
spawn model properties
The properties below can be used on the model level in a Spawn configuration file. For instance, MyModel.json could look like this:
{
"label": "My Model",
"description": "This is the pwettiest model",
"inputs": []
}
(My)Sql statement that represents the default ordering of this model in the cms.
Human-readable model name, which can contains spaces etc. If not configured, this will fall back to the model name.
Description of this model type to display to admins in the cms.
When configured, a Preview button will be automatically added to the CMS form.
It's recommended to use named route, so in the case of:
routes.blog_view.route = "/blog/post/:slug"
You would configure blog_view
as the value for route. Note that Javascript will try to replace any :variable
bit with a model value of the same name.
Whether records of this data type can be created by admins in the cms.
Whether records of this data type are deletable by admins in the cms.
Whether this model is addable via a popin-window in the cms, containing a minimal set of required fields.
Whether this model is visible by default in the cms main model menu.
By default, this is default
. If set to garp
, it will inherit the Garp model configuration of the same name.
Model behaviors. See the separate chapter on Spawn behaviors.
Model relations. See the separate chapter on Spawn relations.
The various fields, see separate chapter on Spawn input types.
A list of field names which will be used by default to show certain fields as columns in the cms list view.
Use this to create a unique key consisting of multiple columns:
"unique": ["name", "foo", "bar"],
A comment field intended for developers. Here, you can elaborate on model specifics.