Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Magento 2中创建扩展Magento blank的自定义标头_Magento_Magento2_Magento 2.0 - Fatal编程技术网

在Magento 2中创建扩展Magento blank的自定义标头

在Magento 2中创建扩展Magento blank的自定义标头,magento,magento2,magento-2.0,Magento,Magento2,Magento 2.0,我试图在Magento 2中创建一个以Magento Blank作为父级的主题,但我不知道如何使用自定义标题更改标题 我首先从magento blank中删除header.container并创建我的容器,但它是在页面包装器中主内容和页脚之间创建的,我无法使其位于主内容之前 这是my layout.xml: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="u

我试图在Magento 2中创建一个以Magento Blank作为父级的主题,但我不知道如何使用自定义标题更改标题

我首先从magento blank中删除header.container并创建我的容器,但它是在页面包装器中主内容和页脚之间创建的,我无法使其位于主内容之前

这是my layout.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="register-link" remove="true" />
        <referenceBlock name="authorization-link" remove="true" />
        <referenceBlock name="wish-list-link" remove="true" />
        <referenceBlock name="my-account-link" remove="true" />
        <referenceBlock name="top.links" remove="true" />
        <referenceBlock name="header.panel.wrapper" remove="true" />
        <referenceBlock name="header.container" remove="true" />

        <referenceContainer name="page.wrapper">
            <container name="custom.header" htmlClass="headerSection" htmlTag="div">
                <block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::html/sections.phtml">

                </block>
            </container>
        </referenceContainer>

    </body>
</page>

这就是HTML的外观: