Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 196476b

Browse files
authored
Merge pull request #8680 from ajithkumar-maragathavel/layout-instrctions
Examples added and some improvements
2 parents 36d049b + a9d1960 commit 196476b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ We recommend always adding a `name` to blocks. Otherwise, it is given a random n
6161
| Attribute | Description | Values | Required? |
6262
|:------- |:------ |:------ |:------ |
6363
| `class` | Name of a class that implements rendering of a particular block. An object of this class is responsible for actual rendering of block output. | A fully-qualified class name, such as `Vendor\Module\Block\Class`. Defaults to `Magento\Framework\View\Element\Template`. | no |
64-
| `display` | Prevents a block from displaying (the associated PHP classes are still loaded). | `true` or `false` | no |
64+
| `display` | Prevents a block from displaying (the associated PHP classes are still loaded). | `true` or `false`. Defaults to `true`. | no |
6565
| `name` | Name that can be used to address the block to which this attribute is assigned. The name must be unique per generated page. If not specified, an automatic name will be assigned in the format <code>ANONYMOUS_<em>n</em></code> | 0-9, A-Z, a-z, underscore (_), period (.), dash (-). Should start with a letter. Case-sensitive. | no |
6666
| `before` | Used to position the block before an element under the same parent. The element name or alias name is specified in the value. Use dash (-) to position the block before all other elements of its level of nesting. See [before and after attributes](#fedg_xml-instrux_before-after) for details. | Element name or dash (-) | no |
6767
| `after` | Used to position the block after an element under the same parent. The element name or alias name is specified in the value. Use dash (-) to position the block after all other elements of its level of nesting. See [before and after attributes](#fedg_xml-instrux_before-after) for details. | Element name or dash (-) | no |
@@ -225,6 +225,12 @@ Sets the declared block or container element as a child of another element in th
225225
| `as` | Alias name for the element in the new location. | 0-9, A-Z, a-z, underscore (_), period (.), dash (-). Case-sensitive. | no |
226226
| `after` or `before` | Specifies the element's position relative to siblings. Use dash (-) to position the block before or after all other siblings of its level of nesting. If the attribute is omitted, the element is placed after all siblings. | Element name | no |
227227

228+
Sample of usage in the page layout:
229+
230+
```xml
231+
<move element="product.info.options.wrapper" destination="bundle.product.options.wrapper" before="-" />
232+
```
233+
228234
### remove {#fedg_layout_xml-instruc_ex_rmv}
229235

230236
`<remove>` is used only to remove the static resources linked in a page `<head>` section.
@@ -256,6 +262,12 @@ Includes a certain layout file.
256262

257263
The specified [handle] is "included" and executed recursively.
258264

265+
Sample of usage in the page layout:
266+
267+
```xml
268+
<update handle="customer_account"/>
269+
```
270+
259271
### argument {#argument}
260272

261273
{:.bs-callout-info}
@@ -267,7 +279,7 @@ Used to pass an argument. Must be always enclosed in [`<arguments>`](#arguments)
267279
|:------- |:------ |:------ |:------ |
268280
| `name` | Argument name. | unique | yes |
269281
| `shared` | If false, creates a new instance of the block. | `false` | no |
270-
| `translate` | | `true` or `false` | no |
282+
| `translate` | Specify whether the string is translatable or not | `true` or `false` | no |
271283
| `xsi:type` | Argument type. | `string`, `boolean`, `object`, `number`, `null`, `array`, `options`, `url`, `helper` | yes |
272284

273285
To pass multiple arguments use the following construction:

0 commit comments

Comments
 (0)