Skip to content

Model Tab

The Model tab allows us to define the data structures that we will later use to create content.

Creation

When you enter the tab for the first time, it is empty, and you can create a new model by clicking the Add New Model button.

Empty model tab right after project creation

When creating a new model:

You must give it a name. For example, let’s create the entity Post.

Name of the new model

Inside the post model, we start defining fields.

For each field, you provide:

  • The name of the field, e.g., title.
  • The field type, currently Content Island supports:
    • Short Text: a simple text string.
    • Long Text: a text string that supports markdown.
    • Number: a numeric value.
    • Date: a date.
    • Date and Time: a date including time.
    • Media: a file type like image or video.
    • Boolean: accepts two values true/false
  • If it is a collection, e.g., to have an image carousel, define a field named photo, type media, and check collection as true, allowing multiple items.
  • Validations: each field may include validations supported by Content Island:
    • Required: the field must be filled.
    • Unique: the field must be unique, e.g., an email field cannot be duplicated.
    • Media Type: allowed media formats (jpg, png, gif, etc.).
    • Minimum Length: for string fields (pencil icon lets you set the number).
    • Maximum Length: for string fields (pencil icon lets you set the number).

Each time you add a new field, a row is added to the table, and you can continue adding more.

A final result may look like this:

Model editing finished with all fields filled

You can delete or reorder rows by dragging (use the icon on the left of each row).

List

Once several entities are created, entering the Model tab will show a list of all defined entities.

Collapsed list of available models

This list is collapsed by default. You can expand each entity to see its fields.

Expanded list of models

To edit a model, click the pencil icon on the right of the row to enter edit mode.

Editing

Edit mode is similar to creation mode, but you can update existing fields.

Example

Example of how this works: Go to the model creation video tutorial