My articles are grouped in 6 categories (created by taxonomy)

I need to output a view page that contains 6 sections each one displays in a block or div the latest article of the category it belongs.

I have a solution how to do that by creating 6 views for each category filtered desc and displaying the last article and a 7th view to hold all the 6 view blocks. The only thing I don't like it about this is if the editor enters a new category I need to manually update the view.

Is there a way to display the 6 cell grid with the categories as I mentioned before?

2 Answers 2


Yeah that's possible.

  • Add a new taxonomy view
  • Add a relationship: Representative node.
  • There configure to sort by node created DESC.

That's it

  • Hello Daniel: I've created exactly as you said but after click ok in the relationships I got an ajax error: An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /internal/admin/structure/views/ajax/config-item/topic/page/relationship/tid_representative StatusText: OK ResponseText: ( ! ) Fatal error: Call to undefined method views_handler_relationship_groupwise_max::view_aliased() in D:\www\internal\sites\all\modules\views\handlers\views_handler_relationship_groupwise_max.inc on line 200 Call Stack #TimeMemoryFunctionLocation Commented Nov 1, 2011 at 14:45
  • I'm very interested in the "representative node" relationship myself. It looks like you need dev versions of views or apply a patch: drupal.org/node/1198200
    – uwe
    Commented Nov 1, 2011 at 16:09
  • maybe this can be done with a preprocess function, looping through an array of categories? Commented Nov 2, 2011 at 4:45

I managed to figure out based on Daniel Wehner clue. There is an obvious bug in the views handlers that has already been submited to the Views development team and got already fixed in the development snapshot.

Step1. Fix the bug First you need to check your Apache's log and notice the line:

PHP Fatal error: Call to undefined method views_handler_relationship_groupwise_max::view_aliased() in ...\sites\all\modules\views\handlers\views_handler_relationship_groupwise_max.inc on line 200

If you get an Ajax error, you should see the error in a modal window.

Now you need to find out views_handler_relationship_groupwise_max.inc, and at line 200 replace the line:

$temp_view = $this->view_aliased();


$temp_view = $this->get_temporary_view();

Step2. Create a taxonomy view of the categories. Once you have the categories display you create a relationships of type: Representative node with the node title, sorted DESC and then add all the fields needed in the main view settings.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.