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

Commit 3a35eb2

Browse files
authored
Merge pull request #5934 from magento/dobooth-patch-1
Added new section for 2.3 parity
2 parents 63b66d5 + 3d8345b commit 3a35eb2

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,41 @@ As result, the `<body>` tag has a new `my-new-body-class` class on all product p
549549
<referenceBlock name="customer-account-navigation-return-history-link" remove="true"/>
550550
```
551551

552+
## Create cms-page/product/category-specific layouts
553+
554+
As of Magento 2.2.11, merchants can select layout updates to be applied to specific Category/Product/CMS Page pages on the frontend. These layout
555+
updates are made by creating layout XML files following specific naming conventions.
556+
557+
For Categories:
558+
559+
- `catalog_category_view_selectable_<Category ID>_<Layout Update Name>.xml`
560+
561+
where:
562+
563+
- _Category ID_ is the desired category ID.
564+
- _Layout Update Name_ is shown as the option for the __Custom layout update__ field of the __Design__ section on the _Category Edit_ page.
565+
566+
For Products:
567+
568+
- `catalog_product_view_selectable_<Product SKU>_<Layout Update Name>.xml`
569+
570+
where:
571+
572+
- _Product SKU_ is the desired product's SKU encoded as a URI.
573+
_example_: "My Product SKU" -> "My%20Product%20SKU"
574+
- _Layout Update Name_ is shown as the option for the __Custom layout update__ field of the __Design__ section on the _Product Edit_ page.
575+
576+
For CMS Pages:
577+
578+
- `cms_page_view_selectable_<CMS Page Identifier>_<Layout Update Name>.xml`
579+
580+
where:
581+
582+
- _CMS Page Identifier_ is the desired page's _URL Key_ with "/" symbols replaced with "_".
583+
- _Layout Update Name_ is shown as the option for the __Custom layout update__ field of the __Design__ section on _CMS Page Edit_ page.
584+
585+
These files must be placed in the appropriate folders for layout XML files. They will be available as __Custom Layout Update__ options for Merchants after flushing the cache.
586+
552587
{:.ref-header}
553588
Related topics
554589

0 commit comments

Comments
 (0)