I have view for taxonomy and it has default name field duplicated, one with link and the other without link.

I have changed the one without link by creating views-view-field--myviewname--name.html.twig template file and it is ok.

But I need to change the other one with link, with some classes and I want to keep the link but want to have custom text for the link. The views-view-field--myviewname--name.html.twig file only applies to the first one(the one without link). I want to customize other one(with link) differently. How to do that? Is there any naming convention? The debug comments does not suggest anything.

  • Probably views-view-field--myviewname--name-1.html.twig – No Sssweat Jul 13 '17 at 5:22
  • @NoSssweat Thanks it worked. But that does not give me the control of the field anchor tag. – Janaka Dombawela Jul 13 '17 at 7:54
  • Did you try writing your own link? <a href="/something">Custom Text</a> – No Sssweat Jul 13 '17 at 17:59

Your Answer

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

Browse other questions tagged or ask your own question.