Hello Magento Friends ?,
Hope you are doing great. Today I will show How to Add Custom Layout Dropdown on CMS Page after Magento 2.3.4. In any case, you missed our last blog, take a glance at How to Implement Multiselect Filter for Order Status in Magento 2 Order Grid.
Magento never remains at the rear side when it comes to modifications and new updates. These upgrades come to the aid for Magento store owners and benefit them to go ahead in the competition race.
Magento 2 Custom Layout Update dropdown on the CMS Page after 2.3.4 offers improved security. Instead of manual entry, it provides a dropdown picker for custom layout update.
Let’s start ?
Contents
Step 1: Firstly, you need to create a layout in your theme folder.
app/design/frontend/Vendor/Theme/Magento_Cms/layout/cms_page_view_selectable_<identifier>_<layoutname>.xml
Say for an example:
app/design/frontend/Vendor/Theme/Magento_Cms/layout/cms_page_view_selectable_about-us_custom.xml
Inside the file enter CSS or JS or any custom code as shown below:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="Vendor_Extension/css/aboutus.css"/> </head> </page>
Step 2: Now, fire Caching Command
php bin/magento cache:flush
Step 3: Select the custom layout update from the backend.
Magento 2.3.3 Layout
Magento 2.3.4 Layout
Now that you know How to Add Custom Layout Dropdown on CMS page, do it without delay. If you come across any complications, mention in the comment part. I will be happy to solve it. Do share it with your Magento friends. Stay in the know.
Happy Updating ?
Are you setting up a payroll system for your eCommerce startup? Ensuring compliance with myriad…
In the expansive universe of Laravel development, Blade serves as the stellar templating engine, propelling…
Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…
In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…
In the world of business, understanding financial metrics is crucial for making informed decisions and…
Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…
View Comments
Hi,
I have followed your steps but the custom layout does not appear on Custom Layout Update in admin, any ideas as to why?