location
Adds, changes, removes, moves, copies, hides or shows a location (node) of a content object.
A step of a YAML migration with type: location. The class expMigrationStepLocation (kernel/classes/migration/steps/expmigrationsteplocation.php) is registered in settings/migration.ini [StepSettings] StepTypeList[location].
Modes
mode: is one of create, update, delete, move, copy, hide, unhide; every step names one.
Keys
| Key | Type | Modes | Default | What it is |
|---|---|---|---|---|
node | identifier (node) | update, delete, move, copy, hide, unhide | the node the step acts on | |
object | identifier (object) | create, delete | create: the object that gets a new location; delete: with parent:, its location below that parent | |
parent | identifier (node) | create, delete, move, copy | the parent node: of the new location (create), of the location to remove (delete with object:), where the node goes (move, copy) | |
priority | int | create, update | the priority of the node among its siblings | |
sort_field | string: path, published, modified, section, depth, class_identifier, class_name, priority, name | create, update | how the children of the node are sorted | |
sort_order | string: asc, desc | create, update | the direction of sort_field | |
main | bool | create, update | true: the node becomes the main location of its object | |
missing | string: fail, skip | update, delete, move, hide, unhide | "fail" | what happens when the node is not there: fail (the default) or skip |
trash | bool | delete | false | when the node is the object's last location, the object is deleted with it: true puts it in the trash |
workflows | bool | all | false | true: the workflows of the operation's triggers run, as in the administration (default: they do not) |
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:
| Value | What it is |
|---|---|
node_id | the id of the node (the new one for create and copy) |
object_id | the id of its object (the new one for copy) |
parent_node_id | the id of its parent node |
remote_id | the remote id of the node |
path | its url path (path_identification_string) |
hidden | whether it is hidden |
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, template-block.
Example
- type: location
mode: create
object: remote:news-welcome
parent: path:frontpage
priority: 10
references: { welcome_on_front: node_id }Related
Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationsteplocation.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.