Now it’s time to work on the most powerful and advanced module in Drupal Land. Of course you will need to enable Views and Views UI, Chaos Tools is required by the system for it but by now you be familiar with its importance.
Once the module are enabled, through the Structure>Views you can access the opportunity that Views offer to Drupalees. The main page is populated with a preset of examples available (e.g. Glossary, Taxonomy, and more). In case we need to create a new View you can create a new set, in this case we will click on Add View. It is important to know which type of nodes will be included in the views. It is a good practice to create a new content type that you would like to feature in the viewwhere you will need to give it a Title, with an optional description, it is also possible to create a page, once we check the box Drupal provides with a number of sensitive options that are already filled. It is also possible to create a menu item for the new view/page created, this make life much easier. Click save and edit, that will bring you to the Admin View Page, at fist glance you might feel a little uncomfortable about it but it is really well built so once you learn more about it the different features it should be quite easy to use in its basic functions.
The settings presents are several:
- Basic ones: Title, Format, Filter, Sort
- Page Settings: Path, Menu and Access info
- Header, Footer and Pager
- Advance Settings
Let’s take a look to the most important settings. Once we define the content type and the format it’s quite important to understand the Sorting Criteria that will define the order of the items featured in our view.
The Ascending and Descending is quite obvious, so the following sorting order set regards filters that can be set and this can rely on the Content, Comments, Users, Taxonomy and other. Once the criteria are defined it is possible to add more than one and rearrange the order of it click and drag and it is possible to delete them as well.
The following basic settings that we need to understand is the Filter Criteria. Now is time to set the content displayed should be published and the content type that will be fetched. It is possible to select different operators among the ones present in the database. It’s quite immediate to understand the filter features, what is interesting to look into a little deeper it is the dynamic filter through which we give the user the option to select and arrange the filter that better suits them, but we can look this later on, once we have a better understanding of the View Panel.
Another powerful tool is the Fields (View). Through the fields we can define in a more precise way what we want to display on the view and how we want to arrange them. It is important to select the fields out of the Format setting pane. In the Field configuration setting page we can select a number of important options, such as to link the content with the node associated with the field, if we want to add a label to the field, or exclude it from display and style settings along with option to rewrite the output of the field.
Once we are familiar with the settings available for the Field we can add more fields to the view, the list available is quite comprehensive. A very important one is the Image, due to the fact that can be useful to understand the fully extent of the power of Views. The Image field is preset to have it link with the content and the size of the image, it can also be associated with Colorbox when the module is enabled on the system.
The next element to look into is the the Format of our View. Through the format we can define the style that we want to use for our display. There are several preset displays such as unformatted, html list, grid and others, and it is important to remember that each of this format comes with different settings. Adding more modules will expand the number of format list available to us, the best example will be the use of the Slideshow Module or the jcarousel one. The one that I use mostly is the grid, so I will get more into the details of it. Through the grid format list it is possible to display the number of items on each column. If we are using the grid and other format it is important to learn how to edit the Pager, this will allow us to determine the number of items to show. The other important option is the table that becomes handy when we are working to display lots of data, one of the useful tools that it offers us is to merge different fields in the same column.