Views Attachment - A View With a View
There are times when you want the first item in a list to stand out. One way to accomplish this is to, first, create the list using Views. It can be either a page, a block, or both. Once you have defined your View, you add an Attachment just as you did with the Page or Block by using Add Display. The 'gotcha' is that you will need to override some of the the default field settings.
For example, say you're setting up a site for a real estate agency. In the listing of properties, you want the first property's image larger than the others in order for it to stand out. In your View, the fields are Title, Body and Image. The default page or block images have been set as thumbnails. Now, add an Attachment. The Title and Body can stay the same. The only change is to the Image. In the Fields block, click on the Image field, set the Format to a larger image size (one that you already set up as an ImageCache Preset) and make sure to click the Overide button in the top right corner of the Attachment: Configure Field fieldset then hit Update.
Next, working with the Attachment, under Basic Settings, set the Items to Display to 1. In the Attachment Settings block, set it to be attached to a page and/or block View, along with setting the Attachment to be displayed at the top or the bottom (first or last) of the parent View.
Finally, go back to the parent View (page and/or block) and select Items to Display. Change the offset from 0 to 1. This keeps your attachment from also being displayed in the list of thumbnails.
Post new comment