Shopware 6主题不能覆盖店面?

问题描述 投票:0回答:1

我试图覆盖店面使用我的插件文件,似乎并没有工作。我使用的是Shopware 6。

我试图按照他们给出的例子来设置它,覆盖logo.html.twig的头。

我的文件目录是。

Installation root > custom > plugins > MY PLUGIN NAME > src > Resources > views > shopfront > layout > header > logo.html.twig

在我的logo文件里有:

{% sw_extends '@Storefront/storefront/layout/header/logo.html.twig' %}

{% block layout_header_logo_link %}
    <h2>Hello world!</h2>
{% endblock %}

我已经运行了 bin/console cache:clear 以及 ./psh.phar cachebin/console theme:compile.

谢谢你。

html plugins twig shopware commerce
1个回答
0
投票

你的目录应该是srcResourcesviewsstorefrontlayout而不是shopfront。

修正目录后,重新安装插件,清理缓存,通过binconsole cache:warmup和binconsole http:cache:warm:up来实现。


0
投票

原来我拉的是主安装分支,而不是最新版本。

© www.soinside.com 2019 - 2024. All rights reserved.