Question

I've made a custom layout update file according to the instruction (https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/xml-manage.html) in 2.4.1, but the option is not displayed for a CMS page I'm creating. I'm expecting a LegacyHomepage option to appear.

Current theme: [vendor]_legacy

CMS page ID: legacy-homepage

Layout file location: app/design/frontend/[vendor]/legacy/layout/cms_page_view_selectable_legacy-homepage_LegacyHomepage.xml

I can't tell what's incorrectly set up. I'd appreciate if anyone can spot anything.

enter image description here

Was it helpful?

Solution

Layout files location is wrong:

Layout file is location: app/design/frontend/[vendor]/legacy/layout/cms_page_view_selectable_legacy-homepage_LegacyHomepage.xml

It should be

app/design/frontend/[vendor]/legacy/Mage_Cms/layout/cms_page_view_selectable_legacy-homepage_LegacyHomepage.xml

app/design/frontend/[vendor]/legacy/layout is not readable layout folder at

Magento readable folder is app/design/frontend/[vendor]/legacy/{Module_vendor}_{ModuleName}/layout

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top