What is a view in Drupal

A views in Drupal provide graphical interface for listing information. The views module allows administrators and site designers to create, manage, and display lists of content.
Each list managed by the views module is known as a "view", and the output of a view is known as a "display". Displays are provided in either block or page form, and a single view may have multiple displays. Optional navigation aids, including a system path and menu item, can be set for each page-based display of a view. By default, views may be created that list content (a Node view type), content revisions (a Node revisions view type) or users (a User view type). A view may be restricted to members of specific user roles, and may be added, edited or deleted at the views administration page.
For more technical users, views can be understood as a user interface to compose SQL-queries, pulling information (Content, Users, etc.) from the database and showing it on screen in the desired format.

Example formats include a HTML table, a RSS feed, a PDF document, a CSV document, an interactive map, an image slideshow, or a JSON representation to be used as a REST endpoint. The same content can be presented in multiple formats at the same time. For instance, you can present a table of user information and on the same page a link to download the data in CSV format.

Views is one of the many systems that allow you to create dynamic sites with Drupal. These sites that, once configured, update their content automatically as time passes. For example, if you have a website that contains information about events, you might want to have a page that lists only future events. To accomplish this you can create an “Event” content type that has a “date” field. Then you create a view with a filter criteria that uses this field so that only events whose date is “today” or greater appear on the final list. Note that it is possible to use date offsets as filter values. Once all the configuration is in place, content editors only need to add nodes and set a value for the “date” field. When Drupal shows the page for this view, it will respect the original configuration and only show results that match the condition from today onwards. This illustrates the need to store node data in separate fields. This way you can use them as fields (to show), filter criteria, sort criteria, and more. If you had this information inside the “body” field, it would be practically impossible to use it for these purposes.

Fields
Fields, or the individual pieces of data being displayed. Adding the fields Node: Title, Node: Type, and Node: Post date to a node view, for example, includes the title, content type and creation date in the displayed results.

Relationships
Relationships, or information about how data elements relate to one another. If relationship data is available, like that provided by a CCK node reference field, items from a related node may be included in the view.

Sort criteria
Sort criteria, which determine the order of items displayed in the view results. Adding the sort criteria Node: Post date (in descending order) to a node view, for example, sorts the displayed posts in descending order by creation date.

Filters
Filters, which limit items displayed in the results. Adding the filter Node: Published (and setting it equal to "Published") to a node view, for example, prevents unpublished items from being displayed.

Displays
Displays, which control where the output will be seen. Every view has a default display, which doesn't actually display the view anywhere but is used to hold the default settings for the view. This default display is also used when the view is called programmatically without specifying another display. Much more useful to users are the page display, which gives a view a path and allows it to be the primary content of a page, or the block display which allows it to appear as secondary content on other pages.

Header
Header, which allow you to add by default one or more text area above the views output.

Footer
Footer, which allow you to add by default one or more text area beneath the views output.

Empty Text
The Empty Text content will be displayed, when you choose in the Arguments Section "Action to take if argument is not present" the option "Display empty text".

1 comment:

M Ramu said...

In Drupal, a view is a listing of information. It can a list of nodes, users, comments, taxonomy terms, files, etc. A view scans your website using any criteria you specify and presents the results in the format of your choice. Example formats include a HTML table, a RSS feed, a PDF document, a CSV document, an interactive map, an image slideshow, or a JSON representation to be used as a REST endpoint. The same content can be presented in multiple formats at the same time. For instance, you can present a table of user information and on the same page a link to download the data in CSV format.

Write a program in PHP to reverse a number

A number can be written in reverse order. For example 12345 = 54321 <?php   $ num = 23456;   $ revnum = 0;   while ($ num > 1)   {   $...