Add drupal_field()|field_value example

Created on 11 May 2023, over 1 year ago
Updated 27 May 2023, over 1 year ago

Problem/Motivation

Sometimes when using drupal_field() you only want to output the field value, not the label etc.
For the cheat sheet it would be helpful to have such an example. This requires: https://www.drupal.org/project/twig_field_value

Sth. like:

Only show the field (requires https://www.drupal.org/project/twig_field_value):
{{ drupal_field('field_image', 'node', 1, 'teaser')|field_value }}

If you agree, this is a nice, typical one, I'll add a MR for that addition.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: won't fix

Version

3.0

Component

Documentation

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Production build 0.71.5 2024