Skip to main content

Types

Attributes differ by their binding type to entities. Each type corresponds to its own module in the system.

Thus, attributes are divided into:

  • For Administrators
  • For Blocks
  • For Pages
  • For Products
  • For Users
  • For Forms
  • For Events
Types

If you have created an attribute for pages, you will not be able to use it for products or forms. When attempting to bind an attribute to an entity, the system will suggest which attributes you can use in that context.

Features of Types

Some types have their own features that are important to know.

Attributes for Users

This type of attribute sets stores information about the users of your application. You can store login, email, username, address, workplace, etc. Information used for user verification must be explicitly specified in the system. You must indicate which field will be responsible for the login, which for the password, and which for the email. For the authorization system to work correctly, the user attribute set must contain these three attributes. You can collect other information about the user at your discretion.

Required Attributes for Registration

Even if you use email as the login, you still need to create both the "login" attribute and the "email" attribute.

A general list of unique capabilities for user attribute fields:

  • Use as login
  • Use as password
  • Use for email notifications
  • Use for phone push notifications
  • Use for phone SMS notifications
  • Use in sign-up form

Attributes for Products

This type of attribute stores information about products. Additional settings for this type of attribute set allow you to specify which attribute you want to use as the product price.

A general list of unique capabilities for product attribute fields:

  • Contains price
  • Contains currency
  • Includes SKU
  • Includes tax rate

General Type Attributes

General type attribute sets do not have additional settings for their fields.

Images

An attribute of type "Image" or "Group of Images" contains one or more image files and provides additional tools for working with files.

Upload Optimization

Attributes related to image uploads have a setting for optimizing image loading. Optimization is enabled by default, so if you want to upload the original image without loss of quality, go to the attribute settings and disable this option.

Preview

If there are multiple image attributes and you want a specific image to be displayed within the system, go to the settings of the corresponding image attribute and enable the "Use as a preview in the product list" setting. After that, in the catalog, the selected image will be the main one for the product.

Preview Template

You can add a preview image template to the image attribute. More about preview templates can be found here.

For an attribute of type Image intended for pages, you can specify that this image will serve as an icon in the menu.

Lists

An attribute of type "List" contains one or more properties pre-configured in the attribute and used in entities as needed.

List Configuration

Open the editing mode for the attribute of type "List" by clicking the edit icon Edit

In the form for adding a new list property, specify:

  • Name - A non-unique string used for operation within OneEntry Headless CMS.
  • Value - A string representing the property value.
  • Type - The type of property.
  • Additional Value - An optional parameter. If no value was added to the list property, the additional value will be used.

After filling in the details, click the "Add" button. The new property will be added to the list.

Modifying a List Property

Select the property you want to modify and click the "Edit" button. All data for that property will be added to the form. Modify the property and click the "Edit" button.

Deleting a List Property

Select the property you want to delete and click the "Delete" button. The property will be removed and will disappear from the list.

Using the "List" Type Attribute

After you have configured the list properties, attach the attribute set to the entity that corresponds to its type. For example, an attribute set of type "For pages" can be attached to a page.

In the attribute field of type "List," you can select one property from the list.

Multi-select for the "List" Type Attribute

If you need to save more than one property in the attribute, activate the "Allow multiple values selection" function by checking the corresponding box. With this function activated, you can add multiple values to the entity attribute at once.

Time Interval

The "Time interval" attribute provides the ability to work with a calendar for composing, planning, and managing time intervals. For example, it allows you to create a schedule for a specialist in a beauty salon.

To start configuring, open the editing mode for the "Time interval" type attribute by clicking the edit icon ‘Settings’.

Date Interval Configuration

On the provided calendar, select the required date interval. To create a 1-day interval, double-click on the desired date.

If there is no need to create multiple intervals, click "Select entire month."

The last day of the month is a special interval that is dynamic and depends on the current month.

After selecting the interval, its configuration will become available.

Interval Options

Every week (available if the duration of the period is a week or less) – repeats the interval every week during the selected month.
Every month – repeats the interval every month in the selected year.
Every year – repeats the interval every year.

These are the three main settings that repeat in other elements of the attribute. They allow you to combine periodicity for selected elements.
What does this mean? For example:

  1. To create a weekly schedule for the organization for the current year, you only need to select the working week interval (e.g., Monday to Friday) and specify "Every week, every month" in the settings.
  2. If you want to specify a specific interval for certain dates (e.g., a spring fair taking place from April 7 to April 11) – for the interval 07.04 – 11.04, you need one setting "Every year."

Automatic Time Period Generation

You can also set time boundaries for the interval. These are time limits defined for each day within the specified interval.

Start period – input field for the start of the time interval.
End period – input field for the end of the time interval.

These boundaries can have a repeating periodicity within the specified range. After clicking the "New interval" button, you will see:
The selector represents the choice of the duration of the time period within the interval, and by clicking the checkbox, you can create uniform periods within this interval.
After configuring the time interval, click the "Save interval" button to save the changes.
Add intermediate interval – allows you to add intermediate time intervals (e.g., break time). Clicking this will open a selector, just like for automatic time period generation.

Exceptions

If you need to set special rules for certain dates, simply click on the desired date in the interval on the calendar, after which it will turn red and become available in the "Exceptions" list.
Attention! Without configuring exceptions, it will simply be highlighted in the intervals.
Configuring an exception has options: Every week, Every month, Every year, but there are also additions.
All day – allows you to completely exclude the selected day from the interval. It becomes unavailable for selection in attributes. Or you can close specific time intervals.
By clicking the "settings" button, a modal window will open with all the time periods set for the date interval, where you can select the excluded time intervals if you do not need the entire day.

Selection in the Attribute

Working with configured intervals involves selecting the start and end of the period in which the specified time is chosen.
How does this work?
First, you need to select the start date and end date in the calendar.

After selecting the interval, it will appear in the list of selected intervals on the right, where you can configure the periodicity "Every week," "Every month," "Every year."

For the specified interval, you can select time periods based on the settings defined earlier.

If you need to exclude certain dates from the selected period, you can also add and configure them.
To do this, simply click on the desired date in the active interval, after which the selection will go to the "Exceptions" list.

Exceptions can be configured for both whole days and specific time intervals.
By default, selecting a date excludes the entire day, but if necessary, you can specify exact time intervals.
To do this, use the settings button: the calendar will be replaced with a list of time slots from which you can select the required exceptions for the selected date.

If you need to cancel an exception but keep its periodicity in other cases, you can click on the generated exception.
(Attention! Clicking on the original exception date will cancel the entire chain of exceptions!) After that, the date will go to the "Except" list of the exception.

Great! Here’s an example of the implementation of the created interval:

.