Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have three different content types like news, events, meetings. Using views i need to display only one post (the latest one) from each of this content type.

Created a view, filter criteria for all four content types selected....and stuck.

share|improve this question

3 Answers 3

up vote 0 down vote accepted

or you can create 3 blocks view nd use menu tabs.

u have 3 content types, create a view with 3 blocks overridenn, each one display latest content of one of those content types, nd display the three blocks into one block from the theme blocks by choosing display as menu tabs from views setting. or u can use Quicktabs modules to do this, its very easy.

share|improve this answer
    
it's for a views slideshow or views showcase... A slideshow with one recent content from each of the four different content types. –  jack Mar 3 '13 at 14:50
    
by using viewfield module, u can try this :1) Create a different view for each content type that lists the node titles in the way that you want. 2) Create a content type called content type slide 3) Add a view field to that content type. 4) Save it 5) Add a new slide 6) Choose one of the content types views 7) Keep on creating content type slides until you have reached the number of content types you want. 8) Create a slideshow view of the slide content type. source : drupal.org/node/1050236 –  Mahdi Mar 3 '13 at 23:42
    
Sounds like it's gonna work... Thanks Mahdi –  jack Mar 14 '13 at 22:30

This would probably best be fixed by creating view blocks and creating a separate view for each of the content types. Then display the blocks in the region as needed. Or you can create a custom page template and embed the views inside that

share|improve this answer

Another solution, you can create only one view (for 1st content type) then create Attachment for second Content type and attach it to your main view block or page. And 3rd attachment for 3rd c.type(do the same thing). You can chose Attachment position also.

Here is video - you can see how to use views + attachments.

Also u can do next thing - you can create one view with 3 block - like attachments - one block for each content type. Then create a template for field output - something like this views-view-field--YOURVIEWNAME--page--YOURFIELDNAME.tpl.php and use views_embed_view function to output results of two block u created before. - like this

<?php print $output; ?>
<?php print views_embed_view('YOURVIEW_NAME', 'block_name1', $row->YOURFIELDNAME); ?>
<?php print views_embed_view('YOURVIEW_NAME', 'block_name2', $row->YOURFIELDNAME); ?>
share|improve this answer
    
This will work, Thanks...but if my display format is views showcase will it still work???? Lemme try and let you know. –  jack Feb 25 '13 at 16:25
    
never worked with showcase, i cant say for sure –  neok Feb 25 '13 at 16:30
    
Thanks neok for the reply...doing it now :) –  jack Feb 25 '13 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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