Translated Alias
The “Translated Alias” attribute is the multilingual variant of the
Alias attribute. It generates a separate
URL-compatible identifier (slug) per language. The values are not stored in the
MetaModel table, but in the translation table tl_metamodel_translatedtext.
Typical use cases:
Multilingual URL parameters for filtering (e.g.
/products/my-productin English,/produkte/mein-produktin German)Readable, stable identifiers for deep links or SEO URLs
Unique short identifiers automatically generated from names or titles
See also
The monolingual variant of this attribute is described under Alias.
Note
An alias is not automatically unique. To ensure uniqueness, the “Unique values” option in the general attribute settings must be enabled.
Warning
If the “Force alias regeneration” option is enabled, existing alias values will be regenerated on every change to the source attributes. This may invalidate already published URLs.
See also
Information on multilingual support in MetaModels can be found on the Multilingual Support in MetaModels page.
Installation
The attribute is installed via the Contao Manager or Composer:
composer require metamodels/attribute_translatedalias
Settings when Creating the Attribute
In addition to the general attribute settings (name, column name, description, override variants), the translated alias attribute offers the following specific options:
Option |
Description |
|---|---|
Alias fields |
Selection of one or more attributes from which the alias is generated. In addition to MetaModels attributes, system meta-fields (ID, PID, sorting, etc.) are also available. |
Force alias regeneration |
If this checkbox is active, the alias is automatically regenerated whenever one of the source attributes changes. The field is displayed as read-only in the backend. |
Valid alias characters |
Character set for automatic generation: Unicode digits and lowercase letters (default), Unicode digits and letters, ASCII digits and lowercase letters, ASCII digits and letters. |
Do not add integer prefix |
If this checkbox is active (default), no |
Alias prefix and postfix |
Optional prefix and postfix prepended or appended to the alias. Unlike the monolingual alias, a separate prefix/postfix can be set per language here (multi-column wizard with language selection, prefix field, and postfix field). |
Note
The “Conversion language” option from the monolingual alias attribute is not available here — the active MetaModels language is used automatically.
Settings in Render Settings
The attribute has no specific render settings. In the attribute list of a render setting, the usual options (Template, CSS class) are available.
Settings in the Input Form
When the attribute is added to an input form, the following options are available:
Display
Option |
Description |
|---|---|
Backend class |
CSS classes for the display (e.g. |
Template for backend |
Selection of a custom widget template for the backend form. |
Template for frontend |
Selection of a custom widget template for frontend editing (only available if the “Frontend Editing” extension is installed). |
Functions
Option |
Description |
|---|---|
Required field |
Makes the field a required field. |
Always save |
Set automatically when “Force alias regeneration” is active. |
Overview (backend filter and search)
Option |
Description |
|---|---|
Filterable |
The attribute is available in the backend as a filter criterion. |
Searchable |
The attribute is available in the backend as a search field. |
Filter Rules
Same filter rules as the monolingual Alias attribute: Simple lookup, Text search, Levenshtein, Loupe.
Special Functions
Database storage
The alias values are stored per language in tl_metamodel_translatedtext
(fields: att_id, item_id, langcode, value as varchar(255)).
No column is created in the MetaModel table.
Language-dependent prefix/postfix
Unlike the monolingual alias, each language version can be assigned its own prefix or
postfix (e.g. de- for the German, en- for the English URL variant).
Uniqueness with suffix
When uniqueness is enabled, MetaModels checks separately per language and automatically
appends a counter for duplicates (my-product-2, etc.).