The Sections Field represents a field that can be created in Model Builder, allowing the inclusion of specific sections of your site in Entries.
For instance, you can use this field to include the section “Fashion” in an article that is relevant to this category, and then leverage this information for various purposes. The following section explains the configuration of the Sections field in the model builder and its usage in an entry, depending on these configurations.
Sections Field in Model Builder
When adding the Sections field in the model builder, you can configure its settings in the right sidebar. The field information that needs to be filled in includes:
Field name: This is the name of the field that will be displayed in entries and other relevant areas.
Alias: A required and unique identifier for the field, which cannot be modified once the field is saved.
Description: An optional field that allows you to describe the purpose or use case of the Sections field.
Display: This specifies the number of the sections that can be added in the field. You can choose between "Single Section" (which allows users to add only one section) or "Multiple Sections" (which allows users to add more than one section). Once saved, this option cannot be changed for the field.
Once you have filled in the necessary field information in the configuration sidebar, you can click the "Create" button at the bottom, and the Sections field will be successfully added to the model editor.
Sections Field Configuration
By selecting the Sections field in the model editor, you have access to several quick actions. These actions enable you to delete the field, open the configuration sidebar, and adjust the field's position within the model.
The Configuration sidebar consists of three tabs: General, Appearance, and Validations. These tabs provide various settings and options for customizing the behavior and appearance of the Sections field.
The General tab in the configuration of the Sections field contains essential field information, including Field name, Alias, Description, and Display settings.
Note that while Field name and Description can be modified even after saving the field, the Alias and Display settings cannot be modified once the field has been saved in the model builder. These settings are fixed and cannot be changed once the field is created.
The Appearance tab in the configuration of the Sections field focuses on how the field will be displayed in the entries created by the model. For this field, there is only one available option: "Section" which is selected by default.
The Appearance tab also includes the Help Text field. This field can be used to display a tooltip in the entry, providing users with additional guidance and understanding of how to use the Sections field effectively.
In the Validations tab, you have the ability to apply constraints to the Sections field. These constraints enforce specific requirements on the field's input, ensuring that the entry cannot be published unless the Sections field adheres to these restrictions. The available options for validation include:
Required field: If you select this option, the Sections field must be filled when creating an entry. It becomes mandatory to input a value in the Sections field before the entry can be published.
Limit Number of Sections: This option allows you to limit the number of sections that users can input into the Sections field. Users will only be able to add sections within this specified range. The available options are:
Between: With this option, you can set both a minimum and a maximum value. Users will be restricted to input sections that fall between these two values.
At least: This option sets a minimum value, and users must input a section that is equal to or greater than the specified minimum.
No more than: With this option, you can define a maximum value, and users must input a section that is equal to or less than the specified maximum.
Restrict Parent/Child Selection: This option limits users to selecting only one section within the same hierarchy tree.
Select on which Entry Status can the Section be updated on Entry Editor: This option restricts users from changing or updating the section of an entry based on the specified entry status. The available options for the entry status are: Draft, Published, Scheduled, Unpublished, and Edited. The selected options mean that the section can be changed or updated when the entry's state is on these statuses.
Note that the "Limit Number of Sections" validation will be available only when the Sections field is specified as "Multiple Sections" under the Display section. This configuration allows users to add more than one section to the field.
By leveraging the Validations tab, you can ensure that the Sections field in your model enforces specific constraints, maintaining data integrity and consistency in your entries.
Sections Field in Entry Editor
The Sections field in the entry will be displayed and can be used based on the configuration in the model. Let's explore some appearances and use cases of the Sections field in the entry editor.
Single Section: If the Display is set to "Single Section" in the model, the user can only add one section in the Sections field in the entry editor.
Multiple Sections: If the Display is set to "Multiple Sections" in the model, the user can add more than one section in the Sections field in the entry editor.
Help text: If a help text is added to the Sections field in the model's configuration, it will be displayed as a tooltip near the field's title in the entry editor, providing additional guidance.
Required field: If the Sections field is marked as a required field in the model, the user cannot publish the entry without adding a section to the respective field. A warning message with a red color will be displayed under the field, indicating that the Sections field is required.
Number of sections: If a specific number of sections is defined for the Sections field in the model, the user cannot publish the entry if the added sections do not fall within the specified range. A warning error with a red color will be displayed under the field, depending on the template configuration in the model.
Parent/Child selection: If the “Restrict Parent/Child Selection” is selected in the model, then the users cannot select Sections which have parent or children selected.
Draft Entry: If the "Draft" entry status is selected as the entry status on which the Section can be updated in the Entry Editor, then the user can modify or update the Section field while the entry is in the "Draft" status.
Published Entry: If the "Published" entry status is selected as the entry status on which the Section can be updated in the Entry Editor, then the user can modify or update the Section field while the entry is in the "Published" status.
Scheduled Entry: If the "Scheduled" entry status is selected as the entry status on which the Section can be updated in the Entry Editor, then the user can modify or update the Section field while the entry is in the "Scheduled" status.
Unpublished Entry: If the "Unpublished" entry status is selected as the entry status on which the Section can be updated in the Entry Editor, then the user can modify or update the Section field while the entry is in the "Unpublished" status.
Edited Entry: If the "Edited" entry status is selected as the entry status on which the Section can be updated in the Entry Editor, then the user can modify or update the Section field while the entry is in the "Edited" status.