Views overview

Last updated on
3 April 2017

Using the Views module, you can fetch content from the database of your site and present it to the user as lists, posts, galleries, tables, maps, graphs, menu items, blocks, reports, forum posts etc. Different content types including nodes, users, and other bundles can be displayed.

Views UI, a submodule within Views, provides a graphical interface underneath which lies a powerful SQL query builder that can access virtually any information in your database and display it in any format.

Different displays can present the query results as pages with fixed URLs on your site (or URLs accepting arguments), blocks, feeds, or panel panes.

You can also use Views to present related content or implement contextual filters. An example of presenting related content is when you want to display a list of users along with links to the content they have created. To do this, you need to create a relationship linking two nodes. You can create a relationship by navigating to Advanced settings in your display page and clicking on "Add Relationship." Once the proper relationship is set up, you can add the fields from the linked node that you would like to display. An example of where you would want to use a contextual filter is if you want to display customized content to a user according to their user ID. To do this, navigate to the advanced settings on the display page and click on add contextual filter. In this case, you would want to add a filter for content: Nid.