【问题标题】:How to override Subscription Block at Drupal 8 Simplenews?如何在 Drupal 8 Simplenews 覆盖订阅块?
【发布时间】:2016-06-03 12:34:30
【问题描述】:

我正在开发一个 Drupal 8 网站,我想覆盖 Simplenews 模块的订阅块。我知道如何在 Drupal 7 中实现这一点,它来自 simplenews-block.tpl.php ,但现在模块不同了。
在 Drupal-7 中,我使用它来覆盖块而不是 .module 文件:http://api.worldempire.ch/api/simplenews/theme%21simplenews-block.tpl.php/7-2。 ..我想要 Drupal-8 的等价物。

【问题讨论】:

  • 请向我们展示您的代码。以便我们可以为您提供更多帮助。
  • 在 Drupal-7 中,我使用它来覆盖块而不是 .mofule 文件:api.worldempire.ch/api/simplenews/… ..我想要 Drupal-8 的等价物,不涉及任何代码

标签: drupal-modules drupal-8


【解决方案1】:

目前没有确切的等价物。要覆盖该块的实际块模板,您可以使用“block--simplenewssubscription.html.twig”。您可以使用输入和表单模板来覆盖其他元素。我建议在 Twig 中启用调试,以便您可以看到模板覆盖。

【讨论】:

  • 非常感谢!这么多天后有人真正回答了,这正是我所需要的!
猜你喜欢
  • 1970-01-01
  • 2018-03-01
  • 2021-04-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-08-28
相关资源
最近更新 更多