如何在树枝中显示 content.field_xxx (Drupal 7)

How to display the content.field_xxx in twig (Drupal 7)

我在新的内容类型中添加了自定义字段 field_instruction(纯文本字段)。

我想在 node.html.twig 中显示像 {{ content.field_instruction }} 这样的字段。然而,它失败了。

我试过{{ content.field_instruction[0] }}{{ content.field_instruction.value }},没有成功。

谁能告诉我如何显示这个字段?

要在 node.html.twig 中呈现字段的默认值,请尝试使用 Twig 变量,如 {{ node.field_some_name.value }}