Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

url_alias (migration step)

Creates, ensures or deletes a custom URL alias of a node, a global URL alias or a URL wildcard.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/migration-steps/url_alias.md

On this page

url_alias

Creates, ensures or deletes a custom URL alias of a node, a global URL alias or a URL wildcard.

A step of a YAML migration with type: url_alias. The class expMigrationStepUrlAlias (kernel/classes/migration/steps/expmigrationstepurlalias.php) is registered in settings/migration.ini [StepSettings] StepTypeList[url_alias].

Modes

mode: is one of create, ensure, delete; every step names one.

Keys

KeyTypeModesDefaultWhat it is
pathstringallthe address, from the root (about-us/team); each part is cleaned as the URL transformation of site.ini makes it
nodeidentifier (node)allthe node the address leads to (create, ensure); delete: the node whose custom addresses go (which: all)
destinationstringcreate, ensurewhere a global address leads (a module URL as content/search, or another address); with wildcard: the destination, {1} the text of the first *
wildcardstringalla URL wildcard instead of an alias: the pattern, * any text (old-news/*)
languagestringallthe language of the address (create, ensure: default the default language of content; delete: default every language it has)
always_availableboolcreate, ensurefalsetrue: the address works in every language of a siteaccess
redirectboolcreate, ensuretruetrue (the default): the address redirects (301) to where it leads; false: it shows the page at its own address
below_parentboolcreate, ensurefalsetrue: path: is placed below the address of the node's parent, as the administration does by default
whichstring: all, selecteddeleteall: every custom address of node: (without node: every global address); selected: the address of path:
missingstring: fail, skipdelete"fail"what happens when the address or wildcard is not there: fail (the default) or skip

Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).

Values for references

references: { <name>: <value> } keeps a value of the step's result as ${ref.<name>} for the steps and migrations after it:

ValueWhat it is
paththe address as stored (cleaned), or the pattern of the wildcard
actionwhere it leads, as the kernel writes it (eznode:59, module:content/search), or the destination of the wildcard
node_idthe node it leads to, or null
removedhow many addresses a delete removed
createdtrue when the step made the address or wildcard
changedtrue when the step changed something

Undoing

Some steps of this type undo themselves when their migration is rolled back without down: (the class says which); a migration with any other step of it needs down: or a rollback to its caption.

Caches it touches (cleared after the run): content, urlalias.

Example

- type: url_alias
  mode: ensure
  path: about-us
  node: "path:company/about"
- type: url_alias
  mode: ensure
  wildcard: "old-news/*"
  destination: "news/{1}"

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstepurlalias.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x