I am trying to override the field rendered in a view. The field name is: this_is_field

I copied the /core/modules/views/views-view-field.html.twig and placed it my theme folder.

I renamed with both methods below


I have turned on Twig debugging and still the copied template isn't working.

Am I renaming wrong?

  • Is that the suggestion pattern? – Kevin Nov 23 '18 at 17:17
  • @Kevin What do you mean? – pierostz Nov 23 '18 at 17:49
  • @pierostz updated my answer – No Sssweat Nov 26 '18 at 9:56

It needs to be:


If you look in Manage Fields, your field machine name is probably field_this_is_field.

Therefore, in your case:


Note that this is will override for all views that have this field, if you want to only target a specific view use:


|improve this answer|||||
  • The first method worked like a charm. How about the second...meaning what is the [view-name]? – pierostz Dec 3 '18 at 10:11
  • @pierostz the name of your view, if your view is called "Cool Items" then you add there cool-items – No Sssweat Dec 3 '18 at 10:18
  • Ok got it working. – pierostz Dec 3 '18 at 10:26

I tried second method from above answer and it didn't work. What works for me is views-view-field--[view-name]--[field-machine-name].html.twig

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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