This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join our live AMA on the Future of Page Builders with Brizy's CEO! Register Now →

How to Use ‘Views’ Module in Drupal 7

Updated on May 18, 2022

4 Min Read
Views-IN-Drupal

Drupal 7 is an incredibly flexible Content Management System (CMS) with a vast library of modules that extend its functionality. One such module is the ‘Views’ module.

A Drupal module is a collection of records containing a few functions and is composed in PHP. Since the module code executes inside the setting of the site, it can utilize all the functions and get to all factors and structures of the Drupal center.

Views had the highest number of downloads in Drupal 7, and it prompted Drupal developers to add it to the core functionality of Drupal 8.

Installing and running Drupal modules are totally free. This incorporates the 40,000+ modules accessible to expand website functionality and the 2500+ themes used for adjusting website’s appearance

Let’s look at what makes ‘Views’ so great and how to use it in Drupal 7.

One of the most crucial factors of a website’s success is how it is displayed to the user. Drupal 7 includes some useful content types by default such as articles and basic pages – each with their own default types of display layout. But, what if you wish to add more types of display layouts such as ‘lists’? This is where the Drupal 7 views module comes into play. It has a number of configurations and can be integrated with more than 300 Drupal 7 modules.

The possibilities of views module are practically endless.

Here are some possible scenarios where ‘Views’ module will be helpful:

  • You like the default front page view, but you find you want to sort it differently.
  • You like the default taxonomy/term view, but you find you want to sort it differently; for example, alphabetically.
  • You use ‘/tracker,’ but you want to restrict it to posts of a certain type.
  • You like the idea of the ‘article’ module, but it doesn’t display articles the way you like.
  • You want a way to display a block with the five most recent posts of some particular type.
  • You want to provide ‘unread forum posts’.
  • You want a monthly archive similar to the typical ‘Movable Type/Wordpress’ archives that display a link to the ‘in the form of “Month,’ YYYY (X)”,’ where X is the number of posts that month, and displays them in a block. The links lead to a simple list of posts for that month.

Don’t just think of the ‘Drupal 7 views’ module as just a display option or a layout builder. Yes, it does allow for custom display types, but it’s a lot more than that. It can even filter content from a database, which allows the user to format and display in his required format.

In Drupal, a view is a listing of information. It can be list nodes, clients, comments, scientific classification terms, records, etc. A view checks your site utilizing any criteria you indicate and presents the results within the arrange of your choice.

To demonstrate the power of ‘Views,’ I’ll be making a simple blog index.

Install and Enable Drupal 7 Views Module

First, you need to download, install and enable the ‘Views’ module if you haven’t done so already.

Stop Wasting Time on Servers

Cloudways handle server management for you so you can focus on creating great apps and keeping your clients happy.

‘Views’ Content Type

Next, navigate to structure. Here you should see the ‘Views’ content type. Click on it to access the main ‘Views’ configuration page.

Add a New View

Once here, click the ‘add new view’ link at the top.

Name your view, then select the content type of ‘Article.

Next, in the ‘Create a page’ section, change the formatting if you wish and check the box beside ‘Create a menu link’ to link the ‘View’ in the main menu.

Once done, click ‘save and exit’ button at the bottom.

Check the New View

Now, navigate to the main menu and click the link for the view you created. You should be able to see the page in accordance with the parameters you set for the view.

Conclusion

As you could have guessed just from the simple example shown in this post, ‘Drupal 7 Views’ is an incredibly powerful module and its popularity is a testament to that fact. ‘Views’ can seem to be confusing at the start, but the best way to get familiar with it would be to play around and find what its different settings can do for you. I hope this post proved useful to you.

Let me know in the comments below if you have any questions.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now