Skip to main content

Introduction

Attributes are an entity that lets you configure the structure of your application. They give you maximum flexibility and let you get rid of hardcoded content.

An attribute set is like a collection of properties whose values you manage in the admin panel. Sets differ in how they are linked to different entities. The set types are described in "Types". (opens in a new tab)

An attribute set defines a data structure that you can then use in your project. For a product, for example, you can define a structure that contains a name, an image, a price, and a text description. A blog post, on the other hand, might contain text with a header and a set of images.

Some attributes have a similar structure and are used in different entities, so you can reuse attribute sets across entities.

Structure​

Each attribute set contains a configurable collection of attributes that store your project's content. You manage these attributes from the management system, so you no longer need to edit the application code to change your project. Move all content that may change into attributes.

Markers

Markers cannot contain spaces or start with a digit. If you enter an invalid value in the marker field, the system ignores the input.

Name​

To help you find your way around, each attribute has a required name parameter, which is a non-unique string. Name attributes in a way that makes them easy to work with.

Marker​

Each attribute has a required "marker" parameter that serves as its identifier and is a unique string. Your project's code also uses the marker as the key to access the attribute. Keep this in mind when you set a marker so you don't run into syntax conflicts.

Data type​

Choose the type of data that each attribute field will store.

The following data types are available:

  • String: Plain text, for example, "Hello, world!".
  • Text: Longer text, often formatted, such as an article or a letter.
  • Text with header: Text with a header that can indicate a topic or category.
  • Integer: A whole number, for example, 5, 100, -2.
  • Real: The same as Float, but with higher precision.
  • Float: A floating-point number that can have a fractional part, for example, 3.14, 1.5, -0.25.
  • Date and Time: A combination of date and time, for example, 2023-10-27 10:00:00.
  • Date: A date, for example, 2023-10-27.
  • Time: A time, for example, 10:00:00.
  • File: Any file on your computer, such as a document, an image, or music.
  • Image: An image, such as a photo or a drawing.
  • Group of Images: A collection of images, such as a photo album.
  • Radio Button: A selection control that allows only one option to be chosen.
  • List: A list of items, for example, a list of product sizes.
  • Spam Protection: A captcha that protects a form from automated submissions.
  • Button: A button with a specified value.
  • Entity: An entity that represents a real-world object, such as a person, a place, or an organization.
  • Time interval: A calendar for creating, scheduling, and managing time intervals.
  • JSON: Stores data in JSON format.

Each type is described in detail in "Types". (opens in a new tab)

The content editing interface for each attribute field matches the data type you select.

System attribute set​

You can create a separate system attribute set. It is not associated with any collection and lets you store arbitrary data. To fill in the system attribute set, open the set's edit page.

Capabilities​

You can add validators to attributes. Validators are covered in detail in "Validators". (opens in a new tab)

Attributes

If several entities use the same attribute set, be careful when you change the attributes in that set. If you delete an attribute, it is deleted, together with its content, everywhere it is used. If you add a new attribute to the set, it is also added everywhere the set is used.