Make Umami recipe field template file names more flexible

Created on 7 February 2024, 11 months ago
Updated 17 March 2024, 9 months ago

Problem/Motivation

There are 4 field templates with names like field--node--field-cooking-time--recipe--full.html.twig. The file names are waaay too specific. Umami is often used for demonstrating a variety of things and we don't need or gain anything by locking it down to that one display mode.

Steps to reproduce

As described in the Layout Builder Plus - Umami demo instructions :

  • Run composer require drupal/lb_plus drupal/field_sample_value
  • Run drush si demo_umami -y; drush en lb_plus_ooo_mommy -y; drush uli
  • As described in the How to Layout Builder Plus instructions on building complex layouts , edit the layout of the recipe (/node/10/layout)
  • Click the plus icon on the bottom right
  • Drag a layout block to the very top of the screen
  • Mouse over the invisible Layout Block and choose Edit layout from the context menu
  • Drag the Cooking Time Field Block and place it into the Layout Block
  • You should see that we lose the styling

Proposed resolution

We should make the template file names more flexible by changing them from names like field--node--field-cooking-time--recipe--full.html.twig to field--field-cooking-time.html.twig.

Before

After

📌 Task
Status

Fixed

Version

10.3

Component
Umami 

Last updated about 1 month ago

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024