I have a view that displays 3 latest articles from a certain taxonomy term. The issue im having is I need to display the taxonomy term as a Header. I dont see the [field_myterm] under Header > Global : Text area.. I also need this taxonomy term translated when I switch languages.


You should probably try to create a Taxonomy term View and not a Content View. Then, you could add a relationship (Taxonomy term : content with term) to fetch your node fields (or rendered entities). Add a taxonomy term filter to select your certain taxonomy term. Add a sort criteria based on descending post date (relationship with content). Display only 3 items. Finally, the taxonomy term name will become your View title and I guess you're done.

  • I tried this but its only displaying 1 node. I"m assuming its because of TAxonomy term: Representative Node... The pager is set to display 3 though. – gerl Oct 7 '16 at 14:07
  • I have just edited my answer, the relationship I mentioned was wrong, sorry – Toki Oct 7 '16 at 15:24
  • No dice. I followed your advice but ended up with 3 duplicate of the same node. imgur.com/a/oKwS3 – gerl Oct 7 '16 at 17:09
  • Check if your query settings is set to "Distinct" and add a sort criteria (Post date) – Toki Oct 10 '16 at 8:47

You can add the taxonomy term field in the list of fields that are shown for each node, and then use that field to group the results. It will give you a common header for the 3 nodes. It is not a view header, but with some CSS nobody will note it.


Have you tried the "Use replacement tokens from the first row"

You could create a hidden field and then you should see the twig token under "replacement patterns"

enter image description here

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.