I have an view that display my custom content type (e.g. covers of video game titles).

Lets assume that I have this structure for my content types:


video game
|--developer_ref (term reference, as choice list)

It works ok except for one thing. I want to display only one video game per developer here (the newest one).

So for example, if we have 3 different developers I want to display 3 items and each of it its the latest node referenced to each developer.

I know how to display 3 latest nodes, but that way they can e.g. all come from one developer.

I have already tried with agreegation on video game.developer_ref field: enter image description here

But I don't know why it doesn't change a thing (I still see multiple games for some developers).



This unfortunately only works if your developers were users. After reading your question again, it appears you have created them as content, in which case my answer does not work.

Views has a built-in feature for this called 'Representative node'. This can be used to

Obtains a single representative node for each user, according to a chosen sort criterion.

So how to use this:

  • Start off by creating a view that lists users and add the Representative node relationship (in the advanced section).
  • Configure the selection criteria; in your case this would be 'Content: Authored on'.

enter image description here

This adds a relationship to Views, allowing you to add fields to the view. If you want to show the rendered node instead of individual fields, add the Rendered entity field instead:

enter image description here

No need for aggregation.

Do note that this will always fetch the last node the user has created of every content type. You should add additional filters to the view to limit this to game-nodes, etc.

|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.