Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.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
Php 如何在magento 2.3.3中创建自定义标题_Php_Magento2_Magento2.3.3 - Fatal编程技术网

Php 如何在magento 2.3.3中创建自定义标题

Php 如何在magento 2.3.3中创建自定义标题,php,magento2,magento2.3.3,Php,Magento2,Magento2.3.3,我正在magento 2.3.3中创建一个存储。我创建了一个自定义标题,但它没有显示在前端。 我已经完成了以下创建自定义标题的步骤; 1:在我的主题文件夹i-e myvendor/mytheme/magento_theme/html/customheader.phtml中的magento_主题文件夹中创建了一个名为customheader.phtml的文件 2:我在dafault.xml文件中添加了以下代码 <referenceContainer name="header.containe

我正在magento 2.3.3中创建一个存储。我创建了一个自定义标题,但它没有显示在前端。 我已经完成了以下创建自定义标题的步骤; 1:在我的主题文件夹i-e myvendor/mytheme/magento_theme/html/customheader.phtml中的magento_主题文件夹中创建了一个名为customheader.phtml的文件 2:我在dafault.xml文件中添加了以下代码

<referenceContainer name="header.container">
<block class="Magento\Framework\View\Element\Template" name="custom_header" as="custom_header" 
 template="Magento_Theme::html/customheader.phtml" />
    </referenceContainer>
 <move element="minicart" destination="custom_header"/>
    <move element="currency" destination="custom_header"/>
    <move element="logo" destination="custom_header"/>
    <move element="skip_to_content" destination="custom_header"/>
    <move element="header.links" destination="custom_header"/>
    <move element="my-account-link" destination="custom_header" />
    <move element="navigation.sections" destination="custom_header"/>
    <move element="top.search" destination="custom_header" after="navigation.sections"/>
    <move element="top.links" destination="custom_header" />
    <move element="store_language" destination="custom_header" />
    <move element="store_switcher" destination="custom_header" />

我在网上搜索过,但运气不好。请帮忙!提前感谢

我认为您已经完成了很好的实现,但是忘记了清除root/generated/code文件夹中的所有内容

您是如何在default.xml文件中设置自定义徽标的?
php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy -f && php bin/magento cache:flush