I am going through hard times. After the latest updates, there is no more the Layout Update XML field in the admin panel (Magento 2.3.4). I needed to create a custom layout for some types of cms pages, so I thought of creating one by adding to my child theme:
/app/design/frontend/Vendor/Theme/Magento_Theme/page_layout/examplepage.xml
containing:
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<head>
<css src="css/csspagine.css"/>
</head>
<referenceContainer name="sidebar.additional">
<block class="Magento\Cms\Block\Block" name="exampleblock">
<arguments>
<argument name="block_id" xsi:type="string">exampleblock</argument>
</arguments>
</block>
</referenceContainer>
</layout>
and under /app/design/frontend/Vendor/Theme/Magento_Theme/page_layout/layouts.xml
<layout id="examplepage">
<label translate="true">Page Example</label>
</layout>
</page_layouts>
finally I added the css file csspagine.css
/app/design/frontend/Vendor/Theme/web/css/
The pages are correctly set in the Magento backend, but the CSS is not loaded. I can't find a solution. Can you help me?
It is important for me that this Css is loaded only on this group of pages and not on the whole site.
thank you all