Drupal 7 you can style down to the fields on the page will we have this type of control with twig? I have reviewed a lot of documents about twig and didn't see anything that lets you have that same inheritance as the Drupal 7 template engine. If this is not built in to twig, is Drupal 8 going to be building it in?

1 Answer 1


I think you might be confusing inheritance with granularity. Twig actually does have the concept of template inheritance (see extends), while Drupal 7's theme engine doesn't.

The short answer is yes, you can expect the same from Drupal 8 as you did from Drupal 7. Specifically for fields, the example in the docs for field.html.twig will give you some insight:

For example, for a field named 'body' displayed on the 'article' content type, any of the following templates will override this default implementation. The first of these templates that exists is used:







These can be altered/added to using hook_theme_suggestions_alter(), or the more specific hook_theme_suggestions_HOOK_alter().


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.