A Node by Any Other Name
One of the most overlooked barriers to working with Drupal is learning its idiosyncratic naming conventions. Most CMSs use a fairly simple set of terms for things such as Pages, Widgets, and Plugins. Drupal used a more computer-science precise language that is nevertheless confusing as heck when you first start working in the CMS.
Let’s review what some of those are!
Nodes/Content
The basic content for Drupal is the Node. This would be a Page (or post) in every other CMS. In the admin interface, the term Node will not be found however - everything is simply called Content.
Developers call them nodes. Editors call them content. Why can’t we communicate?
Blocks
Small pieces of reusable content are called Blocks (and sometimes Beans in Drupal 7). These are Widgets in WordPress and elsewhere. They’re primarily managed through the Block Layout page, which is under the Structure tab.
Blocks, within the Structure tab.
Entities
This is a really confusing one, since it generally only appears on the programming side of things. Entities as used by Drupal are very similar to Objects. The D7 Intro to Entities page has a very good rundown, though they bury the Entity->Object mapping near the end of the page:
- An *entity type* is a *base class*
- A *bundle* is an *extended class*
- A *field* is a *class member, property, variable or field instance* (depending on your naming preference)
- An *entity* is an *object* or *instance* of a *base* or *extended class*
Most Drupal content, be it Blocks or Nodes or even Users, are different types of Entities.
Modules
This is a plugin or add-on. It extends and expands the CMS. They come in two types: community-contributed modules (contrib), and custom modules. Custom modules are where you should write low-level programming for your site.
Drupal maintains a well-curated (but slow) system for vetting and approving contributed modules and patches on Drupal.org. The pages for managing Modules are hidden under the Extend tab.
Modules AKA Plugin or add-on.
Hooks
Drupal contains a very large library of custom functions. While some can be used or re-used in a standalone manner, there are special functions called hooks that allow you to access specific points in the Drupal execution thread. As such, some have to be implemented in a custom module, and some can be used in the template layer (template hooks). They’re called ‘hooks’ because you rename the first part of the function depending on where you implement it.
For example, if you implement the template hook called hook_preprocess_page() in a theme called mytheme, you would rename it mytheme_preprocess_page(). If you implement hook_form_alter in a custom module called mysite_common, it would be mysite_common_form_alter().
The full, searchable list of Core hooks is in the Drupal Core API. Additional hooks can be implemented in modules.
Views
This is a UI for a custom database query generator, and it’s fairly unique to Drupal. There’s an optional setting in Drupal 8 /admin/structure/views/settings
: ‘Show the SQL query’ that can be helpful if you know SQL.
Views is used to build many Drupal lists, such as the primary list of content/nodes seen above, blocks, files, etc., and for content display, such as a dynamic list of upcoming events, or “related content” blocks. The place to add or edit Views is under the Structure tab:
Check out these views.
Taxonomy
Sometimes called ‘Tags’, Taxonomy is the part of the site that holds all of the groups of things such as State names, cities, tags, etc. (called Vocabularies), and those contain Terms. It is also under the Structure tab:
Taxonomy under Structure tab.
Machine Name
A slug! Not a terrestrial mollusk, but the version of something that can be rendered easily in a URL.
D.O
This is shorthand for Drupal.org, the primary drupal site, pronounced Dee-dot-oh.
Drush
This is the command-line tool for Drupal. Very useful for clearing your cache (drush cr
).
And there you have it! That’s the most common set of (potentially) confusing terms that you’ll run across when you’re learning to use Drupal. Good luck!