0

I have a view where I show the content of fields. I check "Create a label" for a field. The label shall be filled dynamically based on the content of another field. Is there a way to use tokens? Or is there another way of achieving this? Thanks

8
  • Look for tutorials on the internet. For example webwash.net/customize-view-fields-using-twig-in-drupal
    – 4uk4
    Sep 26, 2023 at 7:12
  • it is possible to use tokens, but we need more context. what kind of view it is? nodes? what are the other fields? also nodes? same node type?
    – Pedro
    Sep 26, 2023 at 7:12
  • Thank you for the answer. The view shows fields of one node type. All other fields are coming from this node type. Actually these nodes are generated by a feed. I can tamper the contents of the fields during import. So the idea is: Tamper field 2 based on the content of field 1. In the view I like to label field 1 using the content of field 2.
    – CBi
    Sep 26, 2023 at 7:56
  • I looked for tutorials since 3 days. I found a lot how to rewrite the output of a field. But not how to rewrite the label.
    – CBi
    Sep 26, 2023 at 8:01
  • Uncheck "Create a label" and rewrite the entire field using Twig.
    – 4uk4
    Sep 26, 2023 at 9:26

0

Your Answer

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

Browse other questions tagged or ask your own question.