0

I've read the patch notes about moving the Custom Layout Update to a layout file in Magento 2.3.4 so I thought I was doing this correctly but something must be off because I still don't see the option under the Design->Custom Layout Update for this CMS page.

I'm really just looking to add a JS file to this single CMS page. Here's my code:

/app/design/frontend/Vendor/Theme/Magento_Cms/layout/cms_page_view_selectable_my-cms-page_CustomJs.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="js/custom.js"/>
    </head>
</page>

I've run cache:clean and cache:flush multiple times, index:reindexed, and run setup:upgrade until my eyes bled. This site does have multiple themes/sites so maybe there's something there I need to do? Any idea what I'm doing wrong?

0

1 Answer 1

0

Hmm, tough to tell, but I would look into the themes chain of inheritance and make sure I include the layout changes inside the theme that's currently rendered on the frontend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.