Module development HowTos

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


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


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 in the system table.

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 (.tpl.php) files in your own module

Normally (.tpl.php) template files reside in the theme folder.

Guide maintainers