Node

Definition

What is a node?

In Drupal, a node refers to any content—such as a page, article, poll, blog post, or forum topic—that is found on a website.

If you want a more in-depth understanding of this topic, check out the FAQ section below:

Question #1: What is the purpose of a Drupal Node?

The primary purposes of a Drupal Node are as follows:

  1. To help you build whatever type of website you want – Since Drupal treats each piece of content as a node, it becomes easier for you to mix and match different types of content to create the exact finished product you want.
  2. To make content management easier – Drupal allows you to apply changes or new features to all pieces of content that belong to the same node type in one go instead of editing everything one at a time.

Question #2: What types of nodes does Drupal have?

There is virtually no limit to the types of nodes Drupal has because the system allows you to create your own nodes. But the default types available out of the box are as follows:

  • Article – Formerly known as ‘story’, this node type applies to any informational piece of content that is more frequently categorised (such as sports news, business news), cross-referenced, and updated. Content that falls under this node type is commonly sorted with the most recent post on top (as in a blog).
  • Basic page – As the name suggests, this is just the page that hosts all other nodes you want to use. It is super flexible because it is essentially just a blank canvas that can be linked to the main navigation of your website.
  • Blog entry – This is similar to the article node type but functions more like a diary entry than an actual news piece. It is enabled by the Drupal Blog module, which, as the name suggests, allows you to create a blog. It has been removed in Drupal 8, but you can still create it if you want or need to.
  • Book page – This node type is designed to form part of a collaborative book, such as the Drupal developer documentation. It was originally the only node type that can be added to a book, but starting Drupal 7, the system started allowing any type of node to be used with a book.
  • Forum topic – As the name suggests, this node type is a topic that goes in an online forum, which users can comment on or respond to comments. It is organised by category.
  • Poll – This node type is pretty self-explanatory as well. It allows you to ask a question with set answers that users can choose from and automatically tallies the votes for each response, providing users with a real-time count.

Question #3: What is the difference between a Drupal node and a Drupal module?

As we have seen earlier, a drupal node is essentially just a means to classify a piece of content.

A drupal module, on the other hand, is a collection of files designed to perform a specific task or set of tasks. It has access to all structures and variables of Drupal core and is meant to simplify development by eliminating the need to code everything from scratch whenever you need to extend the functionality of your Drupal website.

Question #4: What can I do with Drupal nodes?

The main things you can do with Drupal nodes are as follows:

  • Manage content in bulk – As we have seen earlier, Drupal allows you to make changes to all pieces of content that fall under the same node type in one go, making the entire process extremely quick and easy.
  • Create multiple versions of a piece of content – Instead of overwriting everything, you can just create different versions of content that you are still unsure whether or not you want to permanently change. Doing so allows you to easily go back to an older version if things go wrong (or pick the best performing one after testing each one).
  • Create and manage permissions – Drupal allows you to assign different user permissions to different node types.