Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Examples for Developers

797 sites Security covered Drupal 10–11 PHP ^8.1
View on drupal.org

This project provides numerous well-documented modules that serve as practical examples for using various Drupal core APIs. Developers can enable individual modules to see how specific functionalities are implemented and adapt the code for their own projects.

Follow the Examples project on Twitter: https://twitter.com/DrupalExamples
and you are welcome to join:

#examples_module in Drupal Slack

The Examples for Developers project aims to provide high-quality, well-documented API examples for a broad range of Drupal core functionality.

Do not enable this module in production environment!

The Examples project contains many modules which hopefully illustrate best practices for implementing various Drupal APIs. These modules can be enabled individually, and will typically add menu items to your site, which should guide you through their features. You can then look through the code to see what they are doing.

Developers can learn how to use a particular API quickly by experimenting with the examples, and adapt them for their own use.

Note also that these modules demonstrate internals for Drupal development in PHP (and some JavaScript). Not all Drupal users will need these examples. There are many contributed modules which will do the majority of what a Drupal site-builder could need. Be sure and explore other contributed modules to see if you can find one that meets your needs.

Which branch?

Current development goes in 4.0.x branch, that is aimed to work with core version 10.6+.

How To Use These Modules

As Modules

You can enable these modules just like any others. They all add menu items leading you to a page on your site that will tell you what they are doing.

API.Drupal.Org

You can also browse the documentation generated from this project on api.drupal.org. This gives you the benefit of clickable links between the various functions and classes.

Browse The Repo

You can browse the code itself in gitlab, here: https://git.drupalcode.org/project/examples

Adapt The Code

All of the code in this project is presented under the GNU license, which is the case for all code on drupal.org. You can use and modify this code in your own project under that license.

Core Only

This project covers only core Drupal APIs. Many other APIs exist, and have their own example code. You can find them by following this link: Non-core Drupal examples.

How can you help?

I'm glad you asked:

  • Most of all, we need you to file an issue every time you find an error or ambiguity or something that could be presented better.
  • We need additional examples.
  • We need reviews, corrections, and improvements to existing modules.
  • We need improvements in the doxygen comments.
  • We need help figuring out how to organize this growing mass of examples better, and how to improve the doxygen output on api.drupal.org.

Please feel free to help out in the issue queue. Jump right in.

You can familiarize yourself with The Tao of Examples Development on these issues:

What examples do you need as a developer? Create an issue in the queue if you think there's a need.

Demonstration

Here some links to run the modules in the project at simplytest.me by branch:

Depends on

Dependencies of the latest stable release

  • toolbar Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
11
Tracked since
Feb 2023
Latest release
1 day ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
4.0.7 Stable 10–11 Oct 6, 2026
4.0.6 Stable 10–11 Jun 10, 2026
4.0.5 Stable 10–11 Apr 8, 2026
5.0.x-dev Dev 11 Apr 8, 2026
4.0.4 Stable 10–11 Sep 9, 2024
4.0.3 Stable 10 Aug 28, 2024
4.0.2 Stable Mar 1, 2023
4.0.1 Stable Mar 1, 2023
4.0.0 Stable Feb 18, 2023
3.0.4 Stable Feb 18, 2023
4.0.x-dev Dev Feb 18, 2023