Drupal viewer

What is the use of the views module in Drupal?

+4
source share
5 answers

At its most basic level, Views is a query builder. This is much more than this, because it allows you to manage the results of your queries and set them as pages, blocks, channels, or any other number of output parameters that can be expanded using other modules.

Views are one of the most commonly used modules in the Drupal community. It is currently reported as being installed on 270,290 active sites.

Some examples of using views on a page:

  • You like the default homepage view, but you'll find that you want to sort it differently.
  • You like the standard taxonomy / term, but you will find that you want to sort it differently; for example, in alphabetical order.
  • You use / tracker but want to limit it to messages of a certain type.
  • You like the idea of ​​the "article" module, but it does not display articles as you like.
  • You need a way to display a block with the last 5 messages of a certain type.
  • You want to provide "unread forum posts."
  • You need a monthly archive, similar to typical Movable Type / Wordpress archives, which displays a link to the "Month, YYYY (X)" form, where X is the number of posts this month and displays them in a block. Links lead to a simple list of posts for this month.
+4
source

I usually describe this as a "visual query builder," for example user247245. At a simpler level, presentations can be useful at any time when you need a list of data objects (or their subcomponents) from your site (be it content, users, comments, etc.).

A view can be as simple as a single element; for example, if you want a classic story to be accidentally inserted into a block on the sidebar of each page. Views allow you to add filters (by creation date, by taxonomic term, etc.), designate displays (block, page, etc.) and output topic (at the display level, at the line level, etc.).

Most of the capabilities of Views stems from the fact that it integrates with a large number of other modules. He especially welcomes CCK , allowing you to flexibly display CCK fields as needed. And there are many other modules that add additional display types, such as lightbox slide shows , " , CSV export , JSON output , carousel , calendar , etc.

In short, if you plan to use Drupal, enough time will be spent on using Views.

+3
source

This is a visual "query building tool" that provides you with the ability to retrieve data (nodes).

Think about it, as SQL is "reinvented."

+1
source

At an even more basic level, you use Views to create pages or list blocks. For example, thumbnail lists with headers and teasers, user lists, comment lists, etc. Views extend the execution of basic mysql queries and row fetching, as you can format the display of rows and fields to suit your needs.

Joe

+1
source

For me there is no way to display one content content content on another content type page .. But with the help of views you can do this very easily. You just need to add taxonomic terms and based on this you can display it very easily. You just need to create the right relation and use the contexual filter for this.

eg.

You have two types of content: 1.Page, Record 2.Blog

Now, if you want to display the blog associated with the page on the page as a block, then there is no other way than creating a presentation. and this is a very easy way to do it.

+1
source

Source: https://habr.com/ru/post/1339577/


All Articles