SLee and Topher

Two Guys on Gaming, Tech, and the World

Drupal Views: Modify a Group of Teasers

April 22, 2011 By Topher Leave a Comment

I was working on a new site for my business and banging my head against the wall because the teasers were displaying more information than I wanted them to and I couldn’t figure out how to fix it. After several hours I finally got it; here’s how:

The Drupal Situation

This Drupal 6 site is for user-generated videos. When a user chooses to upload a video to the site, the MediaMover module (more on this module later) sends the video to our CDN (currently YouTube), retrieves the embed code, puts that in the Embedded Media module, which then creates a thumbnail and saves the node. All this is well and good except that the teasers that are created for these nodes contain more than what CCK will allow me to adjust. When I look at the display fields in the content type editor, it only allows me to change the settings for the field where the original video is uploaded and the field that holds the embed code. So what am I supposed to do when the teaser generates information about the user who submitted the node, the timestamp of when it was submitted, and all the other information that my other modules add to it?

Possible Solutions

If you have done any work with themes in Drupal, you are probably aware that in the global configuration section of the administrative theming area of your Drupal 6 site you can change what information is displayed on a node. For instance, I don’t think it is necessary or attractive to have the user name and timestamp displayed on an about or help page. Changing these global configurations is useful for cleaning up nodes like that. Making those changes wouldn’t be a good solution for my videos because on the full node, I do want that information visible.

Another possible solution would be hacking around in the php of the template files. I have been learning php and have successfully made a few minor modifications into these template files. However, something of this magnitude was far outside of my element.

Views: a powerhouse among Drupal Modules

Finally, I came upon my solution. I had been using the Views module already to organize my teasers, and suddenly I realized that I could use a grid style and choose a separate row style for fields. These options are in the first column. In the second column in the fields box, I selected the fields from my nodes that I wanted to display–in this case I chose the node title and content: embedcode. The key was at the bottom of the settings page for the embedcode field. There is a drop-down box for the format of the field. Here I selected the thumbnail that linked to the node. I adjusted a couple other settings, saved the view, and before I knew it, I was looking at exactly what I wanted: clean teasers, no baggage.

Now, if I could only get the related content figured out…

Filed Under: Internet

Get More Stuff Like This In Your Inbox!

Sign up for more free content from SLee and Topher, delivered straight to your inbox.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get the Best Games

Looking for something new to play? Check out BestGamesList.com for the best games 2017 has to offer.

Connect with S&T

Get Free Updates

Enter your email address for free updates on video games and technology from SLee And Topher.

Support SLee & Topher and earn rewards using Ebates:
Ebates Coupons and Cash Back

Must See Stories

Netflix Download and Go

Downloading TV Shows and Movies on Netflix

Retrieve iPhone IMEI

Android Wear: Google’s Wearables Platform Is Here

Domo for NHK

9 Famous Tech Mascots and Their Colorful Backstories

Official ‘Batman: Arkham Knight’ Trailer Reveals Driveable Batmobile

Site Builder Banner for iPage – 250x250

Copyright © 2025 ·Magazine Pro Theme · Genesis Framework by StudioPress · WordPress · Log in