如何添加标题区域? [英] How to add a header area?
本文介绍了如何添加标题区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请告诉我如何在此页面上添加标头
区域。下面的照片。
Please tell me how to add a header
area on this page. Photo below.
推荐答案
-
在THEMENAME.info.yml文件中声明任何新区域。
Declare any new regions in your THEMENAME.info.yml file.
在page.html.twig。
Print your region in page.html.twig.
如果您声明了
header: 'Header'
然后您将其打印在page.html.twig是这样的:
then you will print it in page.html.twig like this:
{{ header }}
之后,您可以创建自定义块并将其放置在新创建的区域中。
有关更多详细信息,请访问 Drupal 8个文档。
After that you can create your custom block and place it in the newly created region. For more details and info go to Drupal 8 Docs.
这篇关于如何添加标题区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文