Drupal is one of the most powerful content management systems we can find, due to its large number of modules. This article is a guide for newcomers to Drupal, using the new inLab website as a practical example.
When faced with creating a website from scratch, a very important point is to decide which of the existing content management systems we can use. For the type of website we wanted, which aims not only to be a showcase but also an internal communication tool, we opted for Drupal due to its flexibility. Such flexibility is associated with a learning curve, which can be made much smoother if we are clear about certain concepts of this content management system from the start.
Basic Concepts of Drupal
Nodes and Content Types
In Drupal, nodes are the actual content. A certain node can be of a certain content type. . For example, this article is of the content type Article (so far, nothing surprising). Other content types that Drupal already includes by default are simple pages (which are basically HTML text). If we want a different type of content, we can create new ones. For example, on this website, we have created the type “Project,” which has served us to create all the project records. Analogous to a relational database, the content types in Drupal would be the tables, and the nodes, the specific records.
Views
Views are one of the most powerful elements of Drupal and allow us to query our content and present it in various forms. We can select only certain fields from our content, group, sort, and filter. Views allow us to do everything from creating a list of projects on a certain topic to a list of articles written by a person.
Taxonomies
Taxonomies allow us to organize our content. In the case of the inLab website, both technologies and areas of expertise are taxonomies. If we tag any content, whether an article or a project with a certain term within a taxonomy, we can then easily relate it to similar content. For example, if we go to the project of expanding El Racó, we will see that on the right, other projects related to collaborative environments that have been done at inLab appear. We have been able to do this because we have tagged them all as “Collaborative Environment”. A view with the query of contents with the same classification as the node we are looking at in the form of a block does the rest.
Themes
These are the visual aspects that Drupal can have when presenting information. A theme has “slots” where the contents will go later. For example, a column on the right, one on the left, a head, a foot, and a central area. Logically, a theme also incorporates a CSS that we can modify to adapt it to our needs. And if we cannot achieve the level of customization we need with CSS, we can always touch the PHP templates that the theme includes to adjust them to our needs.
Blocks
These are page fragments. A block can go into different “slots” that our theme has. For example, we can have a block with a view with related content that goes in a column on the right and one with the menu that goes to the header part.
Modules
Within our website, we had to install several modules to expand the basic functionalities of the package. Here is a list of the most important ones that allow us to do what we need.
Views
The module that allows views curiously is not part of the core of Drupal, but must be installed separately. We have already discussed what it allows: to display the contents introduced in the way that suits us best.
Entity Reference
If we want a content field to be a relationship with another field, we will need this module. With this, we can do, for example, a relationship between a project and a team of people who have carried out this project. In fact, it will allow us to make any type of relationship between contents that goes beyond a classification within a taxonomy.
Date
Another curious thing about Drupal: within the basic types with which it allows to work, there is no date type. If we want to create contents with dates or create calendars, we will need to install this module beforehand.
Slideshow
This module allows us to present sets of photos in a way that they keep passing, as we show on the homepage. What would be a multivalued image type field, which by default would be shown one after the other, can be displayed in a much more dynamic way using this module and without having to program anything.
Internationalization Modules
Drupal has core support for multiple languages, but several modules are necessary to have all the support we need to make a multi-language website. For example, contents can be marked as translatable but… what about the texts of the views? And the labels? All these issues are addressed in this tutorial on internationalization in Drupal 7
Conclusions
Drupal allows us to create our corporate website in a relatively simple way without having to touch code and making it easily modifiable. Any web content management system has an associated learning curve, and this one is no exception. Once overcome, it has allowed us to do everything we needed, and therefore we consider it has been a good choice.