Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
This is going to be a fun video. We'll be looking at the options in Basic setting section that we haven't talked about yet. So, it's going to be a real grab bag of unconnected information. However, each individual setting is a real treat because they each give you a good deal of control over your data's appearance. First, let's talk about settings that are covered in other videos. The highlighted sections you see here were covered in the video about attaching more information to views. The light colored one here was covered in the view about adding view displays. This part was covered in the video about Grid, List and Table formatting and finally, this section about Access is in the video about controlling access to views. The best way to explain what the rest of all of these settings are is simply to demonstrate them.
I should mention that some of the options don't appear all the time and others might appear if you install additional modules. The first one that we'll discuss is a good example of this and to show these off, I'm going to apply them to the Page for family we created earlier. If we go back and take a look at the slide, we see that there is a Row style: Fields. However, that doesn't appear in this Page for family. That's because it only appears when your Style is Unformatted. I am going to override the default, update it and go back and change it to Unformatted and update it. Now, we see this Row style: Fields. If we click on that, we can see what our options are. The other option is Node. Let's try that, click on Update and it gives us a few options. I'm going to leave it in default. Again, we are just taking a quick look at all of our different options and then click on Update again.
Now, if we go down to our preview and look at our display for the page, we see that what it's actually doing is showing the node with its teaser. I'm now going to go back and switch that back to the default, Table, by going up here, click on Style, back to Table and Use default. Scroll down, Update default display and save. The next option is this Use AJAX. Right now it's set to No. I'm going to go to Page for family and click on it and change it to Yes. In this case, we are going to change it right back, so I won't bother overriding the default display. I'll make it Yes, Update default display and save. Now, let's go take a look at that page and see exactly what that means.
So, we are going to display 5 items, and update the default display. Now, as you can see, we only see 5. But what happens if there are more than 5, there is no way to see the rest. If you turn the pager on, there is. We click on the link and scroll down and see several options. We'll turn on the Full pager first and then I'll show you the Mini pager. Update default display, take a look down here and that's what the pager does. It actually lets you go from page to page and go all the way back to the first one or the last one. The Mini display is not quite as flexible. Let's take a look. Use pager, change it to Mini pager, then Update default display. You scroll down to the bottom and you see it just lets you go very easily from page to page, but doesn't have those first and last options. Scroll up and turn off the pager and I'm also going to change the items to display back to 10. Just for safety, I'm going to save it at this point and go back to editing our view.
To show the next section, we have to switch to the Block. We already talked about Items to display and the pager. When you switch to a Block, however, there is no pager. Instead there is the option of a More link. If you specify that you do want a More link, then at the end of the number of items to display instead of saying go to the next page, it will say would you like to go to a certain page full of these things. The page that it will go to is this Link display, in our case, the Page for family. We can see this in action because we already made it that way in a different video, scroll down to our Block and there is our more link. If we click on that, it goes to the People page that we had also setup. This next setting, Distinct, is somewhat unusual and difficult to understand until you start building complex views. Sometimes you'll build a view where the same node will show up more than once. Generally speaking, you won't have to do this. You'll only have to do this if you start to notice problems of repeating nodes.
You generally shouldn't do it because it takes more database power in order to make it work and it will slow down your page load. So, we'll just cancel out of there for now. This next section is the Access link. We'll discuss that in the video about controlling access to views. The Exposed form in block setting is a bit complicated. We had another video about Surveying, Views, Sort, Filter and Field options and showed you how you can make views where the controls are available to visitors by exposing those controls. We are now going to create a filter based on taxonomy and expose it, so I can show you how this Exposed form in block thing works. We add the Filter, scroll down, choose Taxonomy and make it Taxonomy: Term. It will be a drop-down and again, we don't have to give too many details here, but we'll expose it and Update default display. Now, as you see, we have a control that a visitor to the site can use to show only friends, for example, or only people married into the family. But how does that Exposed form in block bit come in? Well, let's go up and we'll turn it from No to Yes and then Update default display. Now, we have to save it to show exactly how that works. What that did is was it moved the control into a block. We'll turn on that block now by going to Administer > Site Building and Blocks and scroll to the bottom for all of the blocks that are currently turned off. You'll see we have this exposed form that was created automatically by views and I'm going to turn it on here in the Right sidebar. We are going to turn it off again in a minute, but for now we'll just save it.
Now, if we go to that People page by going to localhost/people, we can now choose to show only friends from this block in the corner or only married people or so forth. I'm going to go back and remove that block because obviously it is making our main screen a lot narrower, but you can see how useful this is. You could have controls off to the side and let people see whatever they want in the middle of the screen. Before we do anything else though, let's turn off that block; Administer > Site Building > Blocks, scroll down to find it in the Right sidebar and turn it off and save.
Now if we go back to our view, which once again is easy to do if we go by localhost/people and up to our Edit link here, I'm going to get rid of that exposed filter and also turn off that Exposed form in block. All we need to do is scroll down, click Remove, scroll back up and change Exposed form in block, back to No and save once again. We just have one or two more things to show off. I'm going to go back to our view and take a look at the last little bit in these basic settings.
The Empty text setting lets you provide some information even through HTML if the view ultimately displays no hits. To demonstrate we'll have to make a few adjustments. We are going to go to Administer > Content management and Taxonomy, I'm going to add a term to this relationship to family, we'll say Enemy. I don't know why would one will list our enemies on a website for the family, but whatever. As you know, we just created that term so we have no people who are labeled as enemies. Let's go back to our view now by Administer > Site Building > Views.
Now I'm going to add a filter so that only enemies show. Once again that's a filter using Taxonomy: Term, Relationship to family as a drop-down and it has to be only people of the enemy term, Update and if we preview, we see that nothing happens. So, let's say Save and now go to that People page and see what happens. See, if you go to the page, it just appears blank which would cause some problems if you allow people to select empty set. They will say what happened here. So, let's go back and then in the empty text, we'll add just a little something saying, sorry nobody was found and update and save and then back to our page. Now, you see the empty text and indeed, since we put this into default, it shows up here both in the attachment and the block. Again, you have to test your site to make sure you don't have this sort of redundant information if you are using attachments.
Let's go back and edit and clean up after ourselves a little bit. We'll first get rid of that Taxonomy term by scrolling down and clicking Remove. I'm also going to get rid of that Empty text again just so that we keep the site clean, Update default display. And let's save that and make sure that our page and block look the way that we want. Well, that looks pretty good. On the left, our block looks pretty good, but somewhere along the way, we change this attachment, this one person who is featured into a Table view. You can tell because it has this little sort thing, which doesn't make any sense, and in fact, it sort of breaks our attachment.
If I click it, it gives me not the most recently added person, but the person I added first because it is sorting in the other direction. Let's go back and edit that attachment. Make sure that we override our Style, update it and go back up and switch it to Unformatted, Update and Save and make sure that it looks the way that we want. There it is. It looks a lot better. The very last section in this Basic settings area is Theme. It doesn't actually change your view at all, but instead provides valuable information for developers. That's a big subject and we'll touch on it a little bit in the video about altering your views appearance through CSS. And that's that. I warned you there would be a lot to learn in this video, didn't I? And as mentioned earlier, some modules introduce additional settings into this area.
Fortunately, the individual settings themselves tend to be fairly straightforward. Unlike adding a field which involves a three or four-step process, these settings generally only have only one or two switches. Learning what those switches are and where will give you some wonderful extra control over your Views.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.
Your file was successfully uploaded.