I have two seperate node types and d8 with media installed

in both node types there is a field called video using video_embed_field on a deeper layer in the theme because it uses media entity.

I try to find out how to alte the content of

video-embed-iframe.html per node type.

I am new to d8 and twig.

How can i td this inisde a theme without the need of a custom module

cold i theme the video field per contetn type and then display all template contetn in video field based on an if condition?

1 Answer 1


Twig naming pattern for the field per content type is


Read more on Twig naming convention here.


Media entity seems to be following custom template suggestions, that unfortunately are not documented anywhere. See function media_entity_theme_suggestions_media() here for template suggestions patterns. It does not include per content type template suggestion, but you can try overriding it in a custom module.

  • This doesn't work for Media enteties it Works for Fields in General but not in this case
    – Josh
    Commented Dec 10, 2016 at 20:43
  • See update @Josh
    – oksana-c
    Commented Dec 10, 2016 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.