Главная » Web Development » Drupal » How do I show only 3 of the latest posts for each term in a view

How do I show only 3 of the latest posts for each term in a view

21:21

If you need only one node you can use “Representative node” relationship. But if you need three nodes per each term, use something like Views Field View.

1) Create "child" view for content. Something like this: enter image description here

Add taxonomy term argument, pager limits, sorting and etc: enter image description here

Now you can attach this view to another one.

2) Create taxonomy view: enter image description here

Add hidden term ID field and then add “Global: View” field: enter image description here

Don't forget to configure caching. From Views Field View page:

It's highly recommended to use this module in conjunction with views caching. Views Content cache and Cache Actions are good ways of caching views.

(c)