(heavily modified the question for simplicity and clarity)
As a test case, I created <custom-theme>/Magento_Theme/layout/default_head_blocks.xml
. Creating and modifying this file, according to the docs, should affect every page.
In my extended default_head_blocks.xml
I added a bogus JS, just to see what pages it will be added to.
<?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>
<script src="js/test-file.js"/>
</head>
</page>
I can see test-file.js
on category and CMS pages, but not on a product page.
I can't get any layout updates to affect the product page. The product page has the inherited theme Magento Blank
, plus my site logo, located in <theme-dir>/web/imges/logo.svg
.
Any guidance on this issue would be appreciated.
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
and create<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <move element="page.main.title" destination="product.info.main" after="-"/> </body> </page>
and nothing changes