【问题标题】:Shopware 6 meta.html.twig Storefront Template Can't Be ExtendedShopware 6 meta.html.twig 店面模板无法扩展
【发布时间】:2022-11-12 19:16:14
【问题描述】:

我正在尝试在我自己的自定义主题中扩展店面的meta.html.twig 模板,但它不起作用。我成功扩展了logo.html.twig 模板,但meta.html.twig 模板拒绝扩展。我该如何解决这个问题。

我的目录是custom/plugins/TheShoeSeller/src/Resources/views/storefront/layout/meta.html.twig

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

    {% block layout_head_meta_tags_charset %}
                
    {% endblock %}

    {% block layout_head_meta_tags_general %}

    {% endblock %}

【问题讨论】:

  • 你的插件活跃吗?是否有其他插件可以扩展相同的模板?
  • 你清除缓存了吗
  • @Alex 是的,它处于活动状态。
  • @DarkBee 我清除了缓存并且它正在工作。

标签: twig shopware6 storefront


【解决方案1】:

它看起来像一个缓存问题。

如果您可以访问 cli,请尝试以下命令:

bin/console cache:clear

bin/console theme:compile

在此之后,它应该工作。我确实在自定义主题中使用您的文件对其进行了测试。

如果没有,请检查您是否使用了妨碍您使用的插件!

【讨论】:

    猜你喜欢
    • 2022-10-02
    • 1970-01-01
    • 2023-03-21
    • 2021-06-08
    • 2023-01-29
    • 2023-01-20
    • 1970-01-01
    • 1970-01-01
    • 2023-01-22
    相关资源
    最近更新 更多