1

I want to create a view to display news like in this image:

display news

The list shows an image only for the first news, the other news only display the title.

2 Answers 2

3

Views nodes split does exactly this:

This module allows site administrators or builders to have a different view mode for the first nodes of a view result.

Source: Lullabot - Module Monday: Views Nodes Split

1

Quick and dirty, if you don't mind having all the images loaded in your page, you can use CSS to display the first one and not all the rest, eg:

.views-row img {
   display: none;
}

.views-row-first img {
   display: block;
}

I would just theme it a bit more specifically on your site, eg, with the views css names and views field names and so forth, the point is that views themes each row specifically, just take a look at the html output.

2
  • Nice trick Jimajamma
    – tostinni
    Commented Dec 7, 2011 at 17:15
  • 2
    and this way, if you want to get fancy, you can use jQuery and pop open these hidden images when you hover over the other titles :)
    – Jimajamma
    Commented Dec 7, 2011 at 17:34

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.