I find it hard to believe this is not easy to do, I have to be missing something.

I've got all the template files figured out and have seen all the documentation, but still can't see how to simply style the first item from the view result set differently from the rest of the items. Is this even possible? Is there any type of state passed? I can not even find a basic 0..n item count for rows.

Here's my original forum post.
#315053: Theming the first list item when using Views2

Sorry about the cross-posting but I'm desperate.

Comments

emackn’s picture

Thanks to Crell on #drupal-support for helping me out.

I needed to add an attachment display to my view, then attach it to my page display.

emackn’s picture

Status: Active » Closed (fixed)
cpelham’s picture

Status: Closed (fixed) » Active

When I change an attribute of my attachment, it changes the attributes for all the different displays. For example how many nodes to list, or which fields. So, how do you actually make the attachment different than the page or panel display?

merlinofchaos’s picture

Status: Active » Closed (fixed)

For one, that's not even relevant to the original issue, and for two, I've documented this about as clearly as possible in at least a dozen different places but I really recommend you look at the diagram that breaks down the Views UI and pay particular attention to what the italics, 'override' and 'update default display' items mean.

WorldFallz’s picture

Status: Closed (fixed) » Active

Is there some way to supress the duplication of the items presented in the main display in the attachment display other than in theming the attachment?

If the 'node: nid' filter accepted php, that would have been my first guess. I'm thinking it might be doable with argument handling code and the 'Exclude the argument' option, but I can't seem to get anywhere.

Any info would be appreciated-- I just don't want to waste too much time on this if it has to be done in theming.

WorldFallz’s picture

Status: Active » Closed (fixed)

Nevermind-- I'm an idiot. For future reference, you just need to set the offset option in the "Items to display" option in the 'basic settings box' to the number of items you're displaying in the page view. duh.

merlin-- views2 is truly a work of art!