cancel
Showing results for 
Search instead for 
Did you mean: 

CMS Page with <head> in layout update xml

CMS Page with <head> in layout update xml

Hello all,

 

I was able before to include custom css in my cms page using the Layout update xml field with this

<head>
    <css src="css/some_css.css"/>
    <css src="css/some_other_css.css"/>
</head>

But since the v2.0.2 I have the following message whenever I try to save my page

"Please correct the XML data and try again. Element 'head': This element is not expected. Expected is one of ( referenceContainer, container, update, move ). Line: 1"

 

How can I do no to include custom css files in my cms pages?

The pages that included <head> before the update are still working.

2 REPLIES 2

Re: CMS Page with <head> in layout update xml

<head> works perfectly in the Magento 2.0.2, see an example from the core: https://github.com/magento/magento2/blob/2.0.2/app/code/Magento/Backend/view/adminhtml/layout/defaul...

Re: CMS Page with <head> in layout update xml

@Dmitry_Fedyuk No doubt that <head> works just fine in the layout dir of a module. The problem here is in a cms page created in the backend.