Skip to content

Instantly share code, notes, and snippets.

@0-Sony
Created November 24, 2021 14:39
Show Gist options
  • Save 0-Sony/97ba372a6582012151666e44a3c94d83 to your computer and use it in GitHub Desktop.
Save 0-Sony/97ba372a6582012151666e44a3c94d83 to your computer and use it in GitHub Desktop.
Magento2 : Add Custom Layout Update for a specific Cms Page
<?xml version="1.0" encoding="UTF-8" ?>
<!--
pattern xml file name : cms_page_view_selectable_<CMS Page Identifier>_<Layout Update Name>.xml
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="\Vendor\AboutUS\Block\Custom" name="vendor.about-us.custom" template="Vendor_AboutUs::custom-template.phtml" before="-"/>
</referenceContainer>
</body>
</page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment