Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Understanding why views are useful

From: Drupal 7: Reporting and Visualizing Data

Video: Understanding why views are useful

Now that you've seen how Drupal stores and displays data, it's time to start recombining it. The way we do that is with the module you installed at the beginning of the course called Views. In case you didn't install it, do that now along with the Chaos tools module that it requires. You will find them at drupal.org/project /ctools and drupal.org/projects/views. You will also need to enable the Views and Views UI modules. We will go back to our site and click Modules and as we scroll down you will come to a Views group down toward the bottom.

Understanding why views are useful

Now that you've seen how Drupal stores and displays data, it's time to start recombining it. The way we do that is with the module you installed at the beginning of the course called Views. In case you didn't install it, do that now along with the Chaos tools module that it requires. You will find them at drupal.org/project /ctools and drupal.org/projects/views. You will also need to enable the Views and Views UI modules. We will go back to our site and click Modules and as we scroll down you will come to a Views group down toward the bottom.

These are the two that you need to enable. If you've already installed C tools; that will automatically enable the parts of C tools you need as well. If you need help installing these modules, see the section about expanding a site's capabilities with modules in the Drupal 7 Essential Training Course from lynda.com. The best way to explain how Views work is to create a simple one, by way of demonstration. I'll be very brief, but don't worry; you will see all of this again in detail as we go through the rest of the course. To get there we go up to Structure and Views.

I will add a new view. This view will be called Simple list of employees. It shows only employees and I'll leave all of the other settings alone. Go down and Save & exit. And here it is. It looks very much like our front page, doesn't it? We can go back and edit it by going over to this contextual widget up here, click it and Edit view. That takes us straight to the Views settings pages. We will be spending a lot of time here throughout the rest of the course.

The first thing that I am going to do is instead of showing the content; I am going to show individual fields. So I click Content and then change it to Fields and Apply it to all displays. I will accept the defaults and scroll down to see what that looks like. Now we are just showing the titles. You might remember that we had the employee IDs in the title field. If we scroll up to this Fields area we see that's all that we are showing. It just gives us that one field to get us started. But I want to put some useful information there.

So I am going to add the First name, Last name, photo, and Department. Go over to add and search for a First name, add it. I will simply accept all of the defaults so that we can go through this quickly. Add the Last name. Remember, we changed that to Family name. Add it. We want the photos, so we click add again, search for a photo, add that, and finally one more, the Department, and add that.

There, now when we scroll down we can see what we have. The first few records didn't have photos, but then remember, this is the original size of the photo. We can go back and change that by editing that photo and changing it, so that it's only a thumbnail, and apply, scroll to the bottom and see what that looks like. Much better! I will just make a few other changes. The first one is I don't like the way that the shows all these labels and it's all just sort of one thing after another.

There is a very easy way to change that. I am going to change it from an unformatted list to a table. Apply and Apply to all displays. I am just going to accept the defaults. Go down. Already, it looks much better, doesn't it? But let's say that I want to be able to filter this depending on what department somebody is in. We can do that with exposed filters. I will add a filter, select Department, and then expose it, and make the label simply Department, Apply.

Now as we scroll down you see that people can actually select this to see only those people who are working in the field, very handy. The last thing that I'm going to do is to go back up to my Table settings and make all of the fields Sortable. Now not all of them will be Sortable;, for example, the photo really doesn't have any sort of sorting order, but all of the other ones will be. As we go down we see, yup, we can sort by the Family name and so forth. The last thing we have to do is to Save this view.

There it is on our page with the photos and all of the fields we put in. Amazing, what you can do so quickly with Views, but these are the things that we are going to learn in more detail as we go through the course. So I am just going to go back up to this view and keep things clean by deleting it. I'll go to my list of Views, find my Simple list of employees, and Delete. I hope that gives you an idea of the amazing power of Views to change how data appears on your site, and we've only just barely scratched the surface.

Most of the rest of this course in fact, is all about making Views do exactly what you want. We will start off easy, but by the end of this course, you'll see how you can do some amazing things with it.

Show transcript

This video is part of

Image for Drupal 7: Reporting and Visualizing Data
Drupal 7: Reporting and Visualizing Data

44 video lessons · 6809 viewers

Tom Geller
Author

 
Expand all | Collapse all
  1. 13m 50s
    1. Welcome
      50s
    2. What you need to know
      4m 49s
    3. Using the exercise files
      8m 11s
  2. 12m 58s
    1. A yoga studio
      3m 18s
    2. A national organization
      2m 51s
    3. An entertainment company
      4m 3s
    4. An organization with hyperlocal branches
      2m 46s
  3. 40m 49s
    1. Planning your site's data structure
      3m 31s
    2. Creating record templates
      5m 40s
    3. Understanding Drupal 7's data-template model (entities)
      4m 27s
    4. Creating categories using two methods
      6m 14s
    5. Creating unusual field types
      6m 38s
    6. Reusing and grouping fields
      6m 25s
    7. Looking at Drupal's database
      3m 56s
    8. Migrating custom fields from Drupal 6
      3m 58s
  4. 20m 46s
    1. Connecting two fields using references
      5m 35s
    2. Importing data using Feeds
      8m 48s
    3. Changing the appearances of fields
      6m 23s
  5. 53m 15s
    1. Understanding why views are useful
      5m 1s
    2. Learning from built-in views
      5m 52s
    3. Creating and deleting a simple view
      5m 41s
    4. Diving into the Views interface
      8m 48s
    5. Surveying field types
      6m 16s
    6. Adjusting the settings of individual fields
      5m 31s
    7. Sorting and filtering data
      8m 11s
    8. Changing Views' administrative options
      7m 55s
  6. 33m 33s
    1. Varying how a view appears in different displays
      10m 10s
    2. Formatting views with grid, list, table, and jump menu appearances
      6m 43s
    3. Rewriting field output for interesting results
      4m 21s
    4. Creating multipart views using attachments
      6m 8s
    5. Styling the output of views
      6m 11s
  7. 33m 56s
    1. Importing and exporting views
      6m 21s
    2. Controlling access to data
      6m 44s
    3. Adding dynamic filters to views
      5m 41s
    4. Extending views with relationships
      6m 24s
    5. Improving data administration with Views Bulk Operations
      8m 46s
  8. 29m 43s
    1. Understanding locational data
      4m 43s
    2. Setting up the Location module
      9m 42s
    3. Displaying basic maps with the GMap module
      8m 37s
    4. Displaying custom maps
      6m 41s
  9. 23m 50s
    1. Exporting data in simple text form
      7m 4s
    2. Adding dates and calendars
      8m 32s
    3. Displaying content in a slideshow
      8m 14s
  10. 1m 20s
    1. Next steps
      1m 20s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Drupal 7: Reporting and Visualizing Data.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.