views:

758

answers:

3

Hi,

I want to create a view where all 5 of my taxonomy terms are displayed and it then displays the latest node published but this is limited by 1. For Example:

Tax Term 1
Latest node published

Tax Term 2
Latest node published

etc etc

Currently I'm grouping by taxonomy term so it's displaying all nodes published then sorted by published date desc. I can't quite figure out how to limit the nodes to only show one item per taxonomy term.

Any help would be greatly appreciated.

A: 

I'd suggest to use a combination of panels ans views. First, create a (or use the default) view for nodes which takes a taxonomy term as argument. Second, create a panels page containing five regions. Each region is to be filled with a view (in fact it's going to be the same view from step one, but with different arguments). Within panels ui you can restrict the number of shown entries of each view, set this value to one to have only one article be shown per term.

Panels: http://drupal.org/project/panels

Views: http://drupal.org/project/views

Paul
Hi, I'm already using panels on the page I want the block on, ideally I don't want to use mini panels either. I'll keep searching.
digital
Oh, you want to have block. Didn't find that info in the question. Then Panels won't be a solution, of course.But in that case, you can just create five displays of type block in the appropiate view and limit each display to show only the last entry. That way you'll get five blocks (each showing the last node of one of the five terms) and you may enable them via block settings page.
Paul
A: 

I'd recommend checking out the Views Group By module.

http://drupal.org/node/389230

The tutorial listed above actually describes almost exactly what you are trying to do.

David Wees
@David: You are definitely on the right track. But the problem is that digital wants to to show the latest entry under each taxonomy term. I don't know how that possible with group by module you linked too... which also BTW has the additional limitation that you can only use the COUNT() aggregation function in it.
Sid NoParrots
A: 

I have a similar problem: How to show latest of messages nested in a list of jobs. Well, I used a page display to show jobs (with Row Style:Node, teasers). Then, I used node content display (provided by Views Attach module) to show latest message for nid of job (specified by argument) and say attach this to job's teasers.

However, I wish a way to search in those messages. Exposed filter just acts in jobs nor messages attached.

Thanks for your ideas.

Antonio KC