I am trying to create dynamic head using phtml on Magento 2.3.5 p1
.
I am inserting in default.xml the following:
<page>
<body>
...
<referenceContainer name="head.additional">
<block class="Magento\Framework\View\Element\Template" name="custom_head_file" template="Magento_Theme::custom_head.phtml"/>
</referenceContainer>
...
</body>
</page>
The output of custom_head.phtml
is showing inside the BODY and not inside the HEAD.
Any ideas on how can this be debugged and corrected? I also tried refereceBlock
and the result is the same.