Rules for Views in Drupal
Drupal represents the efforts of many developers to create a fully open-source, PHP-based Content Management System (CMS). This system can be implemented to host news-based websites, blogs, or intracompany documents and information pages. Drupal developers built the CMS to work with databases and a PHP framework as its core, but implement other parts of the CMS on top of those components. For example, two components, Rules and Views, exist as separate entities in the Drupal stack, but interact with each other to provide users with rich content and design.
-
The Drupal Stack
-
Drupal starts as a framework built on a database. On top of this database resides a network server and that server's PHP programming language modules. The server and the modules allow the Drupal framework to connect to the Internet and run the necessary PHP code to serve Web pages. Above that, the Drupal framework includes modules and code that facilitate the creation of websites that can access the database.
Drupal Views
-
One of the methods for information retrieval and presentation included in Drupal is called a "view." Views provide programmers with the tools to take data from the database and present them to the user in a specific way. Views focus specifically on how lists and tables of data are presented to the user. Views are not the same as themes, in that they are not concerned so much with how data presentation looks, so much as how the data is organized.
-
Drupal Rules
-
Drupal also contains the concept of "rules," which are conditional statements that react to the state of the framework. Rules dictate that actions occur when certain conditions are met. For example, when specific changes occur, the Drupal system can send emails to users notifying them of the changes. Or, the rule can create breadcrumb menus by determining the user's location in the system.
Using Rules and Views
-
Developers can integrate rules and views together to create powerfully dynamic pages in Drupal. For example, programmers can use rules to dictate how views will present data to the user. This allows developers to re-use rules to organize multiple collections of data.
-