Yogesh Chauhan's Blog

Content types in Drupal

in Drupal on July 10, 2020

A single web site could contain many types of content, such as informational pages, news items, polls, blog posts, real estate listings, etc.

In Drupal, each item of content is called a node, and each node belongs to a single content type, which defines various default settings for nodes of that type, such as whether the node is published automatically and whether comments are permitted.

In previous versions of Drupal, content types were known as node types.

When you first install Drupal with the default installation profile (in contrast to the minimal installation profile), you will have two content types defined: "Article" and "Basic page".

When you enable other core and contributed modules (by visiting Modules), you will find that you have other content types available; you can also create your own content types.

Content types

Article

The Article content type (formerly, "story") is enabled in Drupal in the default installation profile.

Articles are generally used for information that is updated more frequently and often cross-referenced and categorized (such as news items or resources).

📌 By default, Articles are sorted with the most recent post at the top, but this can be customized with contributed modules like Views.

Basic page

The Basic page content type is enabled in Drupal in the default installation profile.

Typically Basic pages are used for static content that can (but are not required to) be linked into the main navigation bar. This is one of the most "basic" content types and can be very flexible.

Blog Entry

The Blog (short for weblog) content type was removed in Drupal 8.

It is an online journal or diary, and Blog module allows registered users on your site to create their own blogs. Each entry in a user blog has content type Blog Entry.

Book Page

Book pages are designed to be part of a collaborative book, enabled by the core Book module.

An example of a collaborative book is the Drupal developer documentation. In older versions of Drupal, only nodes of content type Book Page could be added to a book. However, since Drupal 7 nodes of any content type can be part of a book.

Forum topic

A Forum topic defines a topic for a forum discussion; people can reply to the topic by using comments. Forum nodes are organized into subject areas via a Taxonomy (list of categories).

Poll

A poll is a question with a set of possible responses. Once created, a poll automatically provides a simple running count of the number of votes received for each response.

Your own custom content type

You can create your own custom content types by going to Administer > Structure > Content types > Add content type. 

There are two main reasons for creating your own content type.

First, content types lets you organize your site more efficiently. For instance, you might have "Info" and "News flash" as two simple content types on your site, rather than just using "Article" for both.

Additionally, creating your own content type means that you can create custom fields. These fields can appear as text boxes, select lists, check boxes, etc., providing extensive functionality to content on your site.

Credit: Drupal


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #5 How to uninstall Cocoapods from the Mac OS? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How to change HTML content on click using JavaScript?JavaScriptCrypto.getRandomValues() method in JavaScriptJavaScriptQuery to increment or decrement value in MySQL ignoring negative valuesSQL/MySQLCreate a responsive image gallery using CSS gridCSSHow to Display Related Posts in WordPress?WordPressFunction Scope in JavaScript for BeginnersJavaScript