Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e66c399

Browse files
Apply small changes (magento#6281)
* Added example for layout block * incorrect steps in adding checkout custom field * additional step added * Lauout block example changes * grammar update * Grammar update
1 parent 38c8e3c commit e66c399

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ We recommend always adding a `name` to blocks. Otherwise, it is given a random n
7474

7575
To pass parameters use the [`<argument></argument>`](#argument) instruction.
7676

77+
Sample usage in the product listing page layout:
78+
79+
```xml
80+
<block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml"/>
81+
```
82+
7783
### container {#fedg_layout_xml-instruc_ex_cont}
7884

7985
A structure without content that holds other layout elements such as blocks and containers.

src/guides/v2.2/howdoi/checkout/checkout_custom_checkbox.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To implement such a checkbox, take the following steps:
2020
1. [Declare the plugin in your module's `di.xml`](#declare-plugin).
2121
1. [Create a JS component for the checkbox with custom logic](#create-jscomponent).
2222

23-
## Create a plugin for the `LayoutProcessor`'s process method {#create-plugin}
23+
## Step 1: Create a plugin for the `LayoutProcessor`'s process method {#create-plugin}
2424

2525
In your custom module directory, create the following new file: `<your_module_dir>/Block/Checkout/SomeProcessor.php`. In this file, add the following code sample. This is a plugin that adds a checkbox, makes the street labels trackable, and assigns dependencies to the checkbox.
2626

@@ -205,3 +205,17 @@ define([
205205
});
206206
});
207207
```
208+
209+
## Step 4: Compile and deploy the static content
210+
211+
1. Compile the code:
212+
213+
```bash
214+
bin/magento setup:di:compile
215+
```
216+
217+
1. Deploy static content:
218+
219+
```bash
220+
bin/magento setup:static-content:deploy
221+
```

0 commit comments

Comments
 (0)