Skip to main content

Actions with Attribute Sets

The attributes section is located in the project settings. There you will find a list of attributes sorted by "type"., as well as a form for creating new attributes.

Creating Attribute Sets

To create a new attribute set, you need to specify the attribute name,

marker
, and the attribute type. After clicking the create attribute button, you will see it in the general list of attributes.

Changing the Position of an Attribute Set

You can change the position of attribute sets in the general list. Grab the attribute you want to move by clicking and holding the icon Optimize images, and then move this item. The changes will be saved automatically.

Modifying Attribute Sets

After you have created an attribute set, you need to add attributes to it that will contain content information. To enter edit mode, click the gear icon Optimize images on the selected attribute. In the edit section, you can see existing attributes as well as a form for creating new ones.

You can add an attribute by specifying its name, unique marker, and selecting the type of data that this field will contain. An unlimited number of attributes can be added to one attribute set. Validators can be added to attributes in the attribute set validators and specific properties can be configured specific properties.

Thus, you can form structures of related data, which will give you more control over your project.

Hiding Attribute Sets

You can add attribute sets to various entities according to their type. For example, an attribute set with the type "For Products" can be linked to any product, while the attribute "For Administrator" can be linked to the administrator entity. The system will suggest which attribute sets you can add to a particular entity. If during the project you want to exclude an attribute set from this suggestion list but do not want to delete it, use the eye icon.

Thus, you can hide outdated attribute sets that you no longer plan to use but are already used in the project, which may complicate their removal. At the same time, the hidden attribute set will remain in the list of attributes and will be available for editing.

Hiding an Attribute

If you do not want to use one or more attributes from the entire set, they can be hidden. By clicking the "eye" icon on the attribute, it will be hidden and will not be displayed along with the other attributes from this set. You will see this attribute in the general list of attributes; however, when adding it to any entity, this attribute will not be added.

Deleting Attribute Sets

If you no longer need an attribute set, you can delete it using the trash can icon. After confirming the action in the pop-up window, the attribute will be deleted.

 

Used Attributes

If an attribute set is used in your project, it will be marked with a special indicator Optimize images. Such an attribute cannot be deleted.

Deleting an Attribute

Within the attribute set, select the attribute you want to delete and click the delete icon Edit.

Used Attributes

Unlike an attribute set, you can delete an attribute that is already used in your project. Such an attribute will be removed from all entities where it is used along with the data stored in it.

Adding Attributes

If the attribute set is not added to any entity, it cannot be interacted with. To work with the attribute set, it needs to be linked to an entity of its type. Thus, an attribute set for products should be linked to a product, and an attribute set for administrators to the administrator entity.

To establish such a connection, you need to go to the selected entity and then navigate to the attributes subsection. Select the attribute set from those offered by the system, and it will be automatically added. If the list of attributes is empty, it means you have no unhidden attributes of the corresponding type. In this case, return to the attribute settings section and create it.

In this example, we create an attribute set for pages. Then, we go to the pages section, select the desired one, and open the attributes section. After adding the attribute set, its attributes will appear, which can be filled in. What you fill in these fields will be linked to the page, and you will be able to access the content through the API in your project. The data entered in the attributes can be validated.

Editing Attributes

To change a specific attribute from the attribute set, you need to click the gear icon Optimize images in the Actions column in the attributes list. On the page that appears, there are four fields:

  • Name - field for changing the attribute name
  • Marker - field for changing the unique
    Marker
  • Additional fields - intended for adding additional fields. Unlike the value of the attribute itself, which is dynamic, meaning you can specify different values for the same attribute in different
    entities
    , the value you specify in Additional fields is static. Since Headless CMS OneEntry provides flexible options for its users, you can use Additional fields for various purposes. For example, add a placeholder in the form of an image for the attribute or specify values for tooltips. The main feature of this module is its static nature; the value you specify will be stored in this attribute every time you use it. It is also important to understand that you can add multiple fields in Additional fields. There are nine types available for the value of Additional fields:
    • String
    • Integer
    • Real
    • Float
    • Date and Time
    • Date
    • Time
    • File
    • Image
  • Validation rules - rules for validating the attribute. More details about this will be discussed in the following chapters.

.