[keyword] hook function


Processes variables for node.tpl.php

Most themes utilize their own copy of node.tpl.php. The default is located inside "modules/node/node.tpl.php". Look in there for the full list of variables.

The $variables array contains the following arguments:
- $node
- $view_mode
- $page

TIP: PHP file inclusion workarounds for many Drupal hook functions in one module

TODO: this content is incomplete, unfinished, or under construction.

A typical problem/side-effect of the hook and form validation and submit handler function convention systems of Drupal6/7/8 is that module files can grow in size to cope with many hooks (and/or convention functions).

One way of (sort of) addressing it is illustrated in the Examples Project: form examples, which includes tricks like:

Drupal7: essential global functions and hooks

Global functions: a good place to start is common.inc: Common functions that many Drupal modules will need to reference. 'The functions that are critical and need to be available even when serving a cached page are instead located in bootstrap.inc'.
Subscribe to RSS - hook function