drupal_field and ID

Created on 10 July 2025, 2 days ago

Problem/Motivation

In the previous version I used this module a lot to print the fields of a content type directly in a node.twig template, but now in the new version I don't understand why I have to put an ID.

example:
{{ drupal_field('field_tags', 'node', 1) }}

this ID number is the ID of the node?

the cheatsheet say:
Render field_image from node 1 in view_mode "full" (default)

So If I print the terms I only get the terms in node 1?

Maybe I don't understand the new way of writing, but that sounds very specific. Can't I just print the field value in each node?

something like:

{{ drupal_field('field_tags') }}
💬 Support request
Status

Active

Version

3.4

Component

Documentation

Created by

🇲🇽Mexico koffer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024