Magento 2自定义主题不适用于“家庭”

时间:2018-12-02 11:40:41

标签: magento2

我已经开始根据亮度主题为Magento 2编写自定义主题。我现在面临的问题是,我的自定义主题适用于所有页面,但“主页”页面却适用。 Luma主题在那里仍然处于活动状态,并且不会被我的自定义主题覆盖。

我将自定义主题设置为默认主题,并将其应用于每个商店/视图

我不知道该怎么办。有谁有解决方案或遇到相同的问题?

这是我的default.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/unfair-athl-black.png</argument>
                <argument name="logo_img_width" xsi:type="number">200</argument> 
                <argument name="logo_img_height" xsi:type="number">100</argument>
            </arguments>
        </referenceBlock>
        <referenceBlock name="copyright" remove="true" />

    </body>
</page>

1 个答案:

答案 0 :(得分:0)

Check if config is overriding your theme.

  1. Check if your Home / Start Page has a Design Update at the bottom of the config page in Content -> Pages -> YourHomePage. (for all Store Views)
  2. Check if your Home / Start Page has a layout that is represented in your theme (1 column, 2 column, etc.) (for all Store Views)
  3. Manually remove all generated and static content via command rm -rf magentoroot/var/cache/* magentoroot/var/page_cache/* magentoroot/var/view_preprocessed/* magentoroot/generated/* magentoroot/pub/static/* and re-deploy after

  4. Make sure you include default_head_blocks.xml in the default.xml of your theme