Drupal 6 Attachment Display in VIEWSDrupal 6 Attachment Display in VIEWS
Out of the box, VIEWS in Drupal 6 offers FOUR displays; PAGE, BLOCK, FEED and ATTACHMENT. Of the four the latter is the least used and least understood. So that's exactly what we'll tackle here!
First, I'll quickly review the three that you probably know.
- User enters a PATH and the output of the VIEW is viewable at that URL.
- A BLOCK is created when the view is saved. Going to the Blocks Admin section shows that the newly created BLOCK is disabled and needs to be assigned to a region.
- Custom XML FEEDS can be created to supply users and robots with FEEDS that are tagged with specific taxonomy OR event details for events that are upconing, etc.
And here's what we did with the ATTACHMENT display.
I already had a page display created earlier which simply showed the 10 most recent blog posts and only showed specific fields.
We then selected ATTACHMENT from the Drop Down Selector of Displays and then selected CREATE DISPLAY.
At this point we made some configuration changes, most notably changing from Fields to Nodes, and from 10 to 1 with an offset of one to avoid duplicate results.
After this we had to configure the attachment settings. We observed that the POSITION setting was set to BEFORE and that the ATTACH TO setting was set to NONE. We changes the NONE to PAGE so that the ATTACHMENT display would attach to the PAGE display and appear BEFORE it.
The preview bore witness to our success BUT we visited the actual page to see it in its glory.
Enjoy the video and PLEASE give us feedback on the topics we're delivering. We've enjoyed great feedback so far and would love to hear from YOU! :-)