menu--extras--machine_name.html.twig output image field url value

Created on 16 October 2024, 2 months ago

Problem/Motivation

I can't get at the value for an image field in the menu twig file

Methods that I generally use in twig files are not outputting a URI value.

I have two custom fields [ "field_text_block" type text, "field_tile_image" type image ] on menu items. Getting teh value of the text field is no problem {{ item.entity.field_text_block.value }}, but nothing I do for the image field produces output.

Ex. {{ item.entity.field_tile_image.entity.uri.value }}

πŸ’¬ Support request
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sgorneau

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

Comments & Activities

Production build 0.71.5 2024