URL Field

The URL Field represents a field that can be created in Model Builder, allowing the inclusion of auto-generated or specified URLs in Entries.

For instance, this field allows you to automatically generate or manually specify a URL for the associated article. The following section explains the configuration of the URL field in the model builder and its usage in an entry, depending on these configurations.

URL Field in Model Builder

When adding the URL 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 URL 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 URL field will be successfully added to the model editor.

URL Field in Model Builder

URL Field Configuration

By selecting the URL 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 URL field.

General tab

The General tab in the configuration of the URL field contains essential field information, including Field name, Alias, Description, and URL configuration.

Note that while Field name, Description, and URL configuration can be modified even after saving the field, the Alias cannot be modified once the field has been saved in the model builder.

How to configure URL

Configure the URL pattern by using entry fields. Available fields that can be added as part of URL segments are: Text Field(single value), Number Field(single value), Date&Time Field(single value), Author Field & Section Field (You can use only the ID value of section or author field). The parameters will be automatically replaced with the corresponding values in the Entry Editor. Put the entry parameters into curly braces, e.g {content.field_alias}.

Use these built-in methods in the URL Fields to get the transform specific field value types:

  • Text Field: {slugify(content.field_alias)}

  • Date&Time Field: {getDate(content.fieldalias)}, {getMonth(content.fieldalias)}, {getYear(content.field_alias)}

  • Section Field (single): {content.fieldalias.id}, {content.fieldalias.url}

  • Section Field (list): {getMain(content.fieldalias).id}, {getMain(content.fieldalias).url}

  • Author Field (single): {content.fieldalias.id},{content.fieldalias.url}

  • Author Field (list): {getFirst(content.fieldalias).id},{getFirst(content.fieldalias).url}

By using these methods, you can ensure that the URL pattern is properly formatted and reflects the values of the selected fields in the entry. This can make it easier for users to navigate your website and find the content they are looking for.

Appearance tab

The Appearance tab in the configuration of the URL 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: "Url" 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 URL field effectively.

Validations tab

In the Validations tab, you have the ability to apply constraints to the URL field. These constraints enforce specific requirements on the field's input, ensuring that the entry cannot be published unless the URL field adheres to these restrictions. The available options for validation include:

  • Select on which Entry Status can the URL be updated on Entry Editor: This option restricts users from changing or updating the Url 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 Url can be changed or updated when the entry's state is on these statuses.

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.

Validations Tab

URL Field in Entry Editor

The URL 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 URL field in the entry editor.

  • Draft Entry: If the "Draft" entry status is selected as the entry status on which the URL can be updated in the Entry Editor, then the user can modify or update the URL 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 URL can be updated in the Entry Editor, then the user can modify or update the URL 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 URL can be updated in the Entry Editor, then the user can modify or update the URL 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 URL can be updated in the Entry Editor, then the user can modify or update the URL 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 URL can be updated in the Entry Editor, then the user can modify or update the URL field while the entry is in the "Edited" status.

URL Field in Entry Editor