📜 ⬆️ ⬇️

What I love Drupal for

In my humble opinion, CMS Drupal most closely came to the concept of “perfect CMS”. A great deal in Drupal has been done to make life easier for developers. In this article I want to talk about the main points that I like in Drupal. The material is intended for users who are not familiar with Drupal. Sometimes I have to say very simple things, but it is because of these simple little things that a very pleasant impression of Drupal takes shape.

Immediately it is worth warning that Drupal is not a ready-made solution. After installation, you will not receive a configured and working social network, online store, etc. In Drupal, the principle of "providing opportunities as needed." That is why Drupal does not make satellites and GEs on an industrial scale, and perhaps that is why the number of working sites on Drupal is inferior to such CMS as Joomla and Wordpress, the favorite CMS builders of satellite and HS.

Drupal provides convenient tools for developing a site that you need. The creators of Drupal understand that each site is unique and the provision of a turnkey solution would not be correct, instead they provide development tools. All Drupal and all its modules are imbued with this idea. The absence of restrictions and a lot of settings allow you to develop a website for a specific task easily and simply.

Drupal is a modular structure consisting of kernel modules and third-party developer modules. A simple conclusion follows from this: you can turn off unnecessary features and they will not be used and mentioned anywhere else. Including the capabilities of the kernel. For example, you are developing a business card site and you do not need comments on it. In Drupal, you simply disable the standard comment module and any mention of comments disappears from the admin panel and from the site. Compare this with other CMS, in which unnecessary (in the context of this example) comments will remain looming in the admin panel, and you will have to cut out all the mention of comments from the public part of the site.
')

Nodes


All types of materials (Article, Page, etc.) in Drupal are children of node (node) and have the same basic structure. Unlike many other CMS in Drupal, you can create your own types of materials (for example, Goods, Video, etc.). Why do you need it? Such a question can arise only if we imagine the types of materials as two fields: Title and Content. But this is Drupal and, as some have probably already guessed, you can create your own fields in it (standard: simple line, list, file, image, etc., from third-party modules: e-mail, link, phone, etc. ). And all this creation is carried out through a convenient administrative interface. Of course, each field has many of its settings, which allows you to customize them to fit your needs.

Since each type of material is based on a node, all third-party modules implement their new capabilities with respect to the node, i.e. without knowing which site has its own types of materials, a certain module will be able to add its functions to any type of material (including manually created, about which the author of the module knows nothing).

Each node has a system name, for example node / 105. In addition to each node, you can define a synonym, i.e. additional address where this node will open on the site. In fact, this is the address of the page. And (I especially want to highlight this, because for me this is one of the most important functions), the address of the synonym can be changed to any other at any time, regardless of any other conditions (the presence of material in a particular category, for example). It would seem that such a simple opportunity, as complete control of the page address, is implemented in other CMS very badly. The Global Redirect module makes 301 redirects from system addresses to a synonym, so there will be no problems with duplicate materials in search engines.

Any node (read any page) of the site can be displayed on the main page, attached to the main one at the top, change the publication date, author, change comment settings, etc. Write about this because, even though these are elementary features, not all CMS are implemented normally.

Taxonomy


In terms of creating categories, tags, etc. Drupal does not lag behind its principles of providing not ready-made solutions, but tools to create the solutions you need. In Drupal, the division of materials into different categories is called the scary word Taxonomy, in which, in fact, there is nothing complicated. In ordinary CMS you are given the opportunity to create one set of categories, tags. For example, in the category set, you can create additional categories and subcategories, but for tags there is one special category that allows you to add many arbitrary tags. Drupal, as usual, stands above these solutions, providing tools for creating an unlimited number of sets of categories and their elements with unlimited nesting (in terms of Drupal is a Dictionary and Term). Moreover, each such set of categories can be selected as work as tags (for example, fields for tags about Soft, a field for tags about Iron, etc.). Of course, each category can be tied to any (several or even all, I remind the developer Drupal does not limit anything) to the types of materials. Just to use these features just unlimited.

Input format


In Drupal there is such a convenient opportunity as the input format. It serves to limit allowed tags when writing materials and to automatically convert a specific sequence of characters into code (for example, [videp: link] into a video player). You can create as many input formats as you want, assign any number of input formats to roles for users. Of course, all this is done through the admin area and with ample opportunities to configure the allowed filters.

As you know, standardly in Drupal there is no visual editor, if you need it, then using the Wysiwyg module you can attach your visual editor to each input format (for example, make 10 input formats and attach your own visual editor to each). An example with 10 different editors is contrived, but on a real site it is very convenient to use this feature, for example, to turn off the editor for comments, to make news moderators a simple editor, and for the admin a full-fledged one).

Users

In Drupal, you can create an unlimited number of users, configure them with various access rights (without any restrictions), including access by materials, by fields, by modules.
In user profiles, you can create an unlimited number of your fields (date of birth, links to profiles in social networks, etc.).

Modules


Without third-party modules it is impossible to imagine Drupal. Great API, allowing you to create your own modules without getting into the kernel code, has led to the creation of a huge number of modules. And they, like Drupal, provide tools to solve problems. Cost to cancel another feature of the modules for Drupal is their interconnectedness, surprising interconnectedness. This means that the modules do not duplicate the functionality of each other, but work using each other. When working with Drupal, you will often have to face many situations, that one module depends on another, and the second on the third, etc. You may get the impression that in this way you will have to install many “extra” modules, but this is not the case. Usually, if you need some kind of module that depends on two more, then these two are either already installed and used, or you will soon have them use. Drupal is highly dependent on third-party modules, the site of average complexity uses more than 30-40 modules. Now it is impossible to imagine a modern site on Drupal not using modules.

All modules are located in one place - on the official website of Drupal.org , so there is no need to search for the necessary module all over the Internet. All modules on Drupal.org are free and there are no situations where the author of the module in the future begins to demand money for its module. Paid modules in Drupal are very poorly distributed.

Views

Talking about third-party modules can not get around the most popular, most complex and most functional module for Drupal - Views . The ingenious and simple idea (like everything else in Drupal) of the module is to provide a convenient tool for customizing the output of information. Any. Anywhere.

Views module replaces hundreds of other modules in other CMS. Do you need to display the last five news items in a block with the ability to customize the output exactly as you need? Do you need to create a page that displays all pages with more than 10 comments and the publication date for the last three months? Do you need to create a block that displays the first 200 characters of their last page in a specific section? Do you need to display information from a special type of material in the form of a table with 7 fields paginated, sorted by specific sex for the period from January to July last year? In other CMSs, you would have to look for modules for such individual tasks or write your own queries to the database to tear out information. In Drupal, the Views module serves to solve all these and many other problems related to the output of information. Simply select which fields you need in the administration page, configure filters (by date, by material type, etc.), configure sorting (by date, by some field, etc.) and get what you want.

Any module can add additional fields, sorting criteria, etc. in Views. Remember at first there was an example of disabling the comment module? So, when you turn it off, you will not see the fields associated with the comments in Views, respectively, including the comment module fields, sorting criteria, etc. will appear in their places in Views. In such a simple way, modules interact with each other.

Token

The Token module provides tokens - special markers that are replaced by their values, for example: the title of the material, the publication date, the field name, field value, etc., there are a lot of them (at least 150), other modules can extend their list with their tokens.
This module is actively used by other modules, for example, for generating page addresses, page headers, automatic file renaming, etc. All this is controlled through the admin panel.

Panels

The module continues the idea of ​​Views, but only Panels provides a tool for displaying information in the form of panels on pages or in blocks. In these panels, you can display a variety of information - any node, latest materials, comments, views made in the modules of Views, etc. For example, you can create a page consisting of two panels, display in one content of some node, and in another view from Views with a list of materials from some heading. Of course, all this is done in the admin panel.

Rules

The Rules module allows you to create rules that work under certain conditions. These can be a variety of rules, for example, transferring a user from one role to another when reaching 100 added comments or deleting nodes located in a category with less than 5 comments and published more than a year ago. All rules are configured through a convenient administrative interface.

The description of individual modules may take more than one article, because more than 12.5 thousand third-party modules have been created. One thing is important: most of them provide tools for the developer, and not a specific, completely ready-made solution (this applies to large modules).
It is easy to find a module according to your requirements, because the modules have a clear name, from which it is clearly understood what the module is for. For example, you need a captcha - the CAPTCHA module and its submodules, you need to add Google Analytics - the Google Analytics module is at your service (with a lot of settings, of course), you need to automatically generate node names - the Automatic Nodetitles module, etc. will help you.

Writing your modules

Sooner or later you will want to write your own module. There is nothing complicated in this, you will even understand that it is beneficial to develop your own modules and provide them to the community, since You get additional users to test your useful module.
The api.drupal.org documentation and the module for developers of Devel will help you in the development. And the Coder module will even automatically check your code for compliance with the principles of writing code adopted in the Drupal community (and it is standardized and all third-party developers adhere to it, as a result, it is not difficult to understand the code of other modules). Well, after, you will need to go through the sandbox , in which your code will be examined in more detail by professionals. Particular attention is paid to the security code.

Localization


How do you translate additional modules / plugins / components, etc. in your favorite CMS? You can translate yourself, find someone else's translation on the Internet, but when additional modules / plug-ins, etc. it becomes a lot, it is very difficult to keep track of the updates of translations (if they are of course made). In Drupal, this problem with search for translations is missing as a class, all translations for all languages ​​(and there are quite a few) are stored in one place on the official localize.drupal.org server, and you don’t even need to manually transfer them from there, using the Localization update module automatically import translations to your Drupal site. The module automatically checks for updates (as scheduled) and if at least one new or updated translation line appears, it will inform you about it. Imagine how easily you can create multilingual websites, now you don’t have to search for translations for all modules in a variety of languages, especially you don’t know (have you ever made a multilingual website in ten languages, including Chinese and Japanese, with many modules; imagine how many would it take time to search for translations? there is no such problem at all with Drupal).

Topics


Since Drupal was created for developers, many topics on drupal.org are presented for developers. There are so-called clean themes, which implement all the standard theme template pages and the minimum required CSS for normal Drupal operation. Creating your own themes based on them is a pleasure. I especially like the clean HTML5 Framework theme.

Themes lend themselves to all the information generated by other modules. The creators of the modules provide special functions / theme files that can be overridden in their theme, customizing them for your needs, i.e. no need to edit other modules to customize the theme.

Drupal also provides a mechanism for creating sub-themes, in which only the necessary changes are overridden compared to the main theme, so when updating the main theme, the changes made in your sub-theme will not be lost.

It is worth noting that the admin panel in Drupal can have any theme, even the one that goes by default, even any third-party theme for the admin, or just a theme for the main site. No restrictions.

Drupal.org


Drupal.org deserves special mention. I especially want to mention the structure of the module / topic / installation profile pages. Each module page provides a detailed description of the module's capabilities, links for downloading the latest stable version of the module, and a version for developers. Each module / theme / installation profile shows the number of working sites (in reality, there will be more real sites, because statistics are taken into account only if the update checker module is enabled) using this module / theme / installation profile. Compare this with the abstract number of downloads in other CMS. A module can be downloaded many times, but in reality it can be used many times less. Drupal.org will show you real information about the popularity of the module.

Each module / theme / installation profile has its own Issues section, a kind of forum in which bugs are discussed, new features are suggested, etc. regarding this module / theme / installation profile only. Compare this with the forums of additional modules / plug-ins, etc. in other CMS. Usually, they piled the discussion of all modules into one forum, which is very difficult to understand or, even worse, the discussion of the module is placed on an additional site. There are no such problems on drupal.org.

Literature


For Drupal, unlike other CMS, there is a lot of literature on the development of third-party modules, themes, etc. Including in Russian. I would like to highlight two editions of one book, detailing the techniques for writing additional modules, themes, and installation profiles using the Drupal API. They also have chapters describing the style of writing code adopted in the Drupal community, methods for writing defensive code when, etc.
  1. Todd Tomlinson CMS Drupal 7. Website Management System Design Guide 3rd Edition
  2. John Vandyuk CMS Drupal 6: a system for creating websites and managing them 2nd edition

For beginners, we can recommend the following books on using Drupal:
  1. Byron A., Berry E., Hog N., Walker D., Robbins D., Eaton D. Drupal. Site creation and management
  2. David Mercer Drupal 6. Create reliable and full-featured websites, blogs, forums, portals and community sites

There are a lot more books in English, see Drupal.org/books .

The main problem in studying CMS is an understanding of the logic of work. If you understand logic, you can solve any problem. Drupal is very simple in terms of the logic of the work, so do not pay attention to the online claims that Drupal is very difficult, but try it and make sure of the opposite. The main problem (and main advantage) of Drupal is its unlimited possibilities.

This is a small description of what I like in Drupal, designed to interest users of other CMS.

What do you like about Drupal?

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


All Articles