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

Creating complex information collections with Views

From: Drupal Gardens Essential Training

Video: Creating complex information collections with Views

We just finished creating a collection of tours sorted so the newest ones float to the top, using the feature called Simple Views. Now I'd like to show you how to do the same thing, but using the full version of views, which is also now a part of Drupal Gardens. It lets you do a lot more, but it's also a lot more complicated. I'll just show you a little of how Views works to reproduce the collection we put together using Simple Views, but then we'll go a little bit further. The first thing we have to do is to turn it on. To do that, go up to Modules and scroll down until you see Views.

Creating complex information collections with Views

We just finished creating a collection of tours sorted so the newest ones float to the top, using the feature called Simple Views. Now I'd like to show you how to do the same thing, but using the full version of views, which is also now a part of Drupal Gardens. It lets you do a lot more, but it's also a lot more complicated. I'll just show you a little of how Views works to reproduce the collection we put together using Simple Views, but then we'll go a little bit further. The first thing we have to do is to turn it on. To do that, go up to Modules and scroll down until you see Views.

You can also close up this CORE group up here to get there more quickly. And there it is. We check the box and Save configuration. Then we add a new view by going up to Structure, scroll down to Views, and Add new view. This page is very similar to the one that you saw on Simple Views, but with a few more options. In fact, we can create an exact duplicate of our Simple View using only this screen.

I am going to call this Newest tours. The content will still be only those of type Tour, and it's going to be sorted by newest first. It will create a page. And the thing that I am going to change here is just so that it's easy to tell which one we're working with, whether it's the Simple View or the Regular View. I'll call it newest-tours-using-views. This will be an unformatted list of full posts, without links-- we don't want people to comment on our posts--and without comments.

Go down a little bit and save and exit. So here is our newest-tours-using-views, and if I want to, I can compare that to our new-tours. I'll just a create a new window here, go to new-tours. So this one was created using Simple Views, and this one was created using Views. As you can see, they're exactly the same. Now we're going to go back and change the way the page appears in a few interesting ways. To do that, once again, I go up to Structure and down to Views, and there is the view I created. I click Edit.

The first thing I'll change is instead of showing the whole node--that is, all of the information about the tours-- I'm just going to show a few select fields. To do that, we click Edit Page details. This interface is nearly identical to the full version of Views that you get if you download Drupal and host it on your own computer. Scroll down a little bit, and the first thing we'll change is from Content to Fields. That lets us break up what's actually shown. And Apply. We have several options here, and I am just going to say okay, Apply. As I say, the full version of Views is extremely complex.

Down below all of these settings you'll see a preview. This shows you what will happen if you were to save now and then go back to that page. I am going to add a few fields. Right now all that we have is the Title. So I click Add. And then we have a very long list of all of the things that we could add. Some of these are specific to the content itself; some are related to the user who posted the content; and so forth. You can filter as you see by choosing from the pop-up menu here or by typing in here. One thing I'll look for is length-- I want to show not only the title of the tour, but how many days it is--and also the price.

So length, I'll add that, and I'll keep all the default information and just Apply. Then I am also going to add the price. Once again, I'll search for price here, and Add and configure fields. Now I'll accept the defaults. As I scroll down now, I see a little bit more information. You have a lot of control over exactly what you show. To make this a little more attractive, I am going to change the FORMAT.

Instead of it being an unformatted list, I'll turn it into a table-- that's a very popular one for views. Apply it. We have once again more options. For example, you could sort it by all of these different things, by clicking the SORTABLE button, and Apply. Let's scroll down and see what that looks like. Quite nice, right? And in fact, as you see, we can sort by price and by length and so forth. I am going to add one more field, which is going to be a photo. You might remember some of these have a photo associated with them.

Click Add, do a search for photo, and add it. And here because it's an image, we have very different options available. I am going to make this just a thumbnail, a little tiny one, and I'll link it to the node itself, to the content. Apply, scroll down. It's quite a nice look now, isn't it? And you can go on and do so many other things. For example, you can rearrange the fields to put them in a specific order, you can change exposed filters so people can choose what they see, and so forth.

Before I do anything else, I am going to go back up to the top and click Save. This is the part that many people forget when doing Views, because it looks like you're doing so much, but actually it doesn't get saved until you click Save. Then it becomes permanent. Great! One other thing that you can do with Views is you can add a block, or several other types of displays. To do that, go up to Add > Block. The Block name will be Our latest tours.

This is what shows up on the block's Admin page, which you learned about in the video about blocks. As we scroll down, we can see what it's going to look like. It's got quite a few fields for a block actually, and we can change that if we want. To do that, you would click on any one of the fields and change it from all displays to just this block. That overrides so that it breaks it away from the template that's set up when you created the page. Now, you'll notice this is italicized. That means it's different from the default.

In other words, you can now change things, like removing the photo and the length and the price, and in fact, I am going to do that. I'll remove it here. We see that we only have three fields now, whereas if we switch the page, we have our original four. Going back to the block, I'll remove also the length and the price, just to keep it easy. And finally we go back up to Save.

Now let's see how that looks. If we click on Page, you can go directly to the page. I'm going to do that and Ctrl+Click so that I can open it in a new tab up here. There is our Newest tours, and you can see compared to the old Simple View, it's much easier to look at a large list of tours. Going back to that block, we can make that visible by clicking Structure > Blocks. If we scroll down to our Disabled Blocks, we see the one that we just created, Our latest tours.

I am going to put that in the right- hand sidebar, which is known as sidebar B, scroll down to the bottom, and Save. We'll close out the overlay and see how that looks. If we scroll down, there it is. It's in the right-hand sidebar, just as we wanted, with only the titles, while the page itself shows all of this information. Now, there is your introduction to Views. But I don't want two features on our site that essentially do the same thing, that is, show this list of tours. So I am going to go back and delete the view we just created, leaving only the Simple View we created earlier.

When I do, the block and page displays that are part of it will automatically disappear. So I go up to Structure, and Views, over to edit, and delete. Click delete, and we're done. When I close out the Overlay, we get told that we can't go to that page because of course that was displaying the view that we just deleted. So I'll just go back to our homepage. When Acquia created Drupal Gardens, only Simple Views was available, and it was good enough.

At the time, the Views interface was simply too difficult to use, so the company figured it would be better to avoid all of the support questions they'd get by not including the Full Views module. But very much to their credit, Acquia funded development to make the interface easier, then gave those improvements back to the Drupal community. That's really admirable. Not only do you benefit as a Drupal Gardens user, but everyone who uses Drupal benefits. As this little peek showed you, Views is a huge subject. In fact, Lynda.com has an entire course that's mostly about it, called Drupal 7: Reporting and Visualizing Data.

That's a good place to start if you want to know how to rearrange content you already have to create some amazing data collections.

Show transcript

This video is part of

Image for Drupal Gardens Essential Training
Drupal Gardens Essential Training

65 video lessons · 11849 viewers

Tom Geller
Author

 
Expand all | Collapse all
  1. 29m 56s
    1. Welcome
      1m 39s
    2. Previewing the finished project
      1m 29s
    3. What's new in the late 2011 update?
      5m 28s
    4. What is Drupal?
      5m 8s
    5. What is Drupal Gardens?
      5m 57s
    6. Getting started with Drupal Gardens
      5m 35s
    7. Getting help
      4m 1s
    8. Using the exercise files
      39s
  2. 17m 40s
    1. Using the administrative overlay
      2m 54s
    2. Using the dashboard, toolbar, and shortcut bar
      5m 36s
    3. Touring the newly created site
      3m 55s
    4. Configuring the site
      5m 15s
  3. 59m 47s
    1. Creating and managing content
      11m 11s
    2. Creating and managing content types
      10m 35s
    3. Embedding YouTube videos and other media
      4m 5s
    4. Subscribing to RSS feeds
      4m 49s
    5. Categorizing RSS feeds
      5m 1s
    6. Managing tags and taxonomies
      5m 50s
    7. Creating dynamic pages with simple views
      4m 29s
    8. Creating complex information collections with Views
      8m 59s
    9. Creating image galleries
      4m 48s
  4. 37m 50s
    1. Working with blocks
      10m 26s
    2. Setting up rotating banners
      7m 45s
    3. Understanding menus
      7m 27s
    4. Setting up contact forms
      7m 7s
    5. Adding and removing functionality
      5m 5s
  5. 54m 54s
    1. Managing users
      6m 28s
    2. Adjusting user permissions
      6m 35s
    3. Managing comments
      7m 7s
    4. Slowing spam
      5m 20s
    5. Starting discussion forums
      9m 3s
    6. Creating blogs
      4m 41s
    7. Setting up mailing lists
      4m 50s
    8. Allowing users to rate content
      4m 21s
    9. Using best practices for online clubs
      6m 29s
  6. 44m 35s
    1. Getting feedback with webforms
      6m 14s
    2. Publishing RSS feeds
      6m 40s
    3. Taking advantage of social media
      9m 33s
    4. Emphasizing external links
      2m 44s
    5. Improving search engine optimization (SEO)
      7m 30s
    6. Internationalizing sites
      8m 6s
    7. Tracking site usage with Google Analytics
      3m 48s
  7. 34m 40s
    1. Understanding Drupal themes
      5m 44s
    2. Understanding the Theme Builder
      5m 25s
    3. Switching, saving, and copying themes
      7m 13s
    4. Introducing custom CSS
      6m 51s
    5. Refining selections in the Theme Builder
      5m 48s
    6. Exporting themes
      3m 39s
  8. 48m 31s
    1. Changing the site's color palette
      2m 32s
    2. Changing the site's main logo and favicon
      5m 22s
    3. Changing the column number and arrangement
      5m 7s
    4. Adding background colors and images
      6m 29s
    5. Changing element spacing and borders
      6m 11s
    6. Adjusting typography
      4m 24s
    7. Using fonts from outside sources
      5m 7s
    8. Inserting raw CSS code into themes
      6m 57s
    9. Adding visual effects with JavaScript libraries
      6m 22s
  9. 14m 18s
    1. Finessing theme design
      7m 51s
    2. Eight ideas for modifying themes
      6m 27s
  10. 23m 38s
    1. Monitoring sites
      4m 11s
    2. Duplicating and deleting sites
      4m 23s
    3. Adding custom domains
      3m 48s
    4. Using exported sites outside of Drupal Gardens
      3m 46s
    5. Hosting exported Drupal Gardens sites
      7m 30s
  11. 51s
    1. Goodbye
      51s

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 Gardens Essential Training.

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 preferencesfrom 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.