Module development HowTos

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Drupal 7 module development tutorials.

Examples for database update scripts using hook_update_N (how to do one time configuration programmatically)

Settings can be deployed only once when rolled into code and put in an update hook in the .install file of a custom module.

How to add a column with dynamically generated action buttons in a View

Introduction

How to change a field value

Purpose: Change a field value in an existing node.

How to connect to multiple databases within Drupal

Drupal can connect to different databases with elegance and ease!

How to integrate UUID with third party entities

When developing custom entity type and you need to integrate it with UUID module you need to do the following:

How to integrate with the Stripe module

GENERAL USAGE

How to make configuration objects exportable with CTools

Many modules have a concept of configuration presets – collections of configuration or other types of objects that administrators set up

How to rebuild node_comment_statistics

There is a function devel_rebuild_node_comment_statistics() in devel.module which will do this for you. It is fast too. Just put

How to update a module's weight

In Drupal, the order in which a module's hooks get called is dependent on the weight of your module

How to use EntityFieldQuery for Drupal 7

The EntityFieldQuery API lets you fetch information about entities (nodes, users, taxonomy terms et cetera) from Drupal without actually

Paging non-SQL data

Generic Array Pager (D6)

Using template files in your own module

Normally template files reside in the theme folder.

Guide maintainers

gopisathya's picture
lolandese's picture