Field template for display mode of referenced paragraph I have a custom field field_platform (referencing a the custom paragraph type platform) and a template for my field: field--field-platform.html.twig. Is there a way to override this for a specific display mode of the referenced paragraph type? I have a mode named cover_view for the custom paragraph type platform I want to override the field template for.

I found Field template for display mode but the template suggestion is for the display mode of the content, not the referenced paragraph.

Drupal 8.5.6, Paragraphs 8.x-1.3

Thanks in advance!
Implement hook_theme_suggestions_alter like in the other answer and you can find everything you need in the $variables.



The following snippet will add the template suggestion for the view mode of the referenced paragraphs. Note that this will probably only make sense as long as you use only one paragraph type OR all multiple paragraph types have the same view mode configured.

/**
 * Implements hook_theme_suggestions_HOOK_alter().
 */
function MYMODULE_theme_suggestions_field_alter(array &amp;$suggestions, array $variables) {

  $element = $variables['element'];

  if ($element['#field_type'] == 'entity_reference_revisions') {

    foreach ($element as $key =&gt; $value) {
      if (is_numeric($key) &amp;&amp; isset($value['#paragraph'])) {

        $paragraph = $value;
        $suggestions[] = 'field__' . $element['#field_name'] . '__paragraph__' . $paragraph['#view_mode'];
      }
    };
  }
}


Seems you can implement that from you theme's *.theme file as well.



I guess the same logic works for any entity (node etc.) reference as well.