layout
Creates, updates, ensures or deletes a layout of Exponential Layouts with its zones and their links to shared layouts.
A step of a YAML migration with type: layout. The class expMigrationStepLayout (kernel/classes/migration/steps/expmigrationsteplayout.php) is registered in settings/migration.ini [StepSettings] StepTypeList[layout].
Modes
mode: is one of create, update, ensure, delete; every step names one.
Keys
| Key | Type | Modes | Default | What it is |
|---|---|---|---|---|
identifier | string | all | required | the identifier of the layout |
name | string | create, update, ensure | the name of the layout | |
layout_type | string | create, update, ensure | a layout type of explayouts.ini ([LayoutType_<type>]); the zones it defines are added | |
shared | bool | create, update, ensure | whether other layouts can take the blocks of its zones (a new layout: false) | |
zones | map | create, update, ensure | zone => {} (a zone of its own), { link: "<shared layout>/<zone>" } or { link: none } | |
publish | bool | create, update, ensure | true | true: the draft is published; false: the change stays in the draft |
missing | string: fail, skip | all | "fail" | what happens when the layout, or Exponential Layouts, 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:
| Value | What it is |
|---|---|
layout_id | the id of the published layout (of the draft with publish: false) |
identifier | its identifier |
created | true when the step created the layout |
changed | true 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, template-block.
Example
- type: layout
mode: ensure
identifier: landing_page
name: Landing page
layout_type: layout_2
zones:
main: {}
header: { link: "header_footer/header" }
references: { landing: layout_id }Related
Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationsteplayout.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.