layout_block
Creates, updates, ensures or deletes a block in a zone of a layout of Exponential Layouts, with its parameters.
A step of a YAML migration with type: layout_block. The class expMigrationStepLayoutBlock (kernel/classes/migration/steps/expmigrationsteplayoutblock.php) is registered in settings/migration.ini [StepSettings] StepTypeList[layout_block].
Modes
mode: is one of create, update, ensure, delete; every step names one.
Keys
| Key | Type | Modes | Default | What it is |
|---|---|---|---|---|
layout | string | all | required | the identifier of the layout |
zone | string | all | required | the identifier of the zone |
name | string | all | required | the name of the block, by which the step finds it in the zone |
definition | string | create, update, ensure | the block definition (explayouts.ini [BlockDefinition_<identifier>]): title, text, list ... | |
view_type | string | create, update, ensure | how the block renders (a new block: default) | |
item_view_type | string | create, update, ensure | how the block renders its items | |
position | int | create, update, ensure | the place in the zone, from 0 (a new block: after the last) | |
parameters | map | create, update, ensure | parameter => value; the others are kept | |
publish | bool | create, update, ensure, delete | true | true: the layout's draft is published; false: the change stays in the draft |
missing | string: fail, skip | all | "fail" | what happens when the layout, the zone, the block 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 |
|---|---|
block_id | the id of the block (in the published layout, or in the draft with publish: false) |
layout_id | the id of the layout it is in |
created | true when the step created the block |
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_block
mode: ensure
layout: landing_page
zone: main
name: Welcome
definition: title
view_type: title
parameters: { title: Welcome, tag: h1 }Related
Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationsteplayoutblock.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.