function nd_theme in Node displays 7
Same name and namespace in other branches
- 6.3 nd.module \nd_theme()
- 6 nd.module \nd_theme()
- 6.2 nd.module \nd_theme()
Implements hook_theme().
File
- ./
nd.module, line 269 - Node displays.
Code
function nd_theme() {
$theme_functions = array();
$path = drupal_get_path('module', 'nd');
// Single theming functions.
$formatters = array(
'nd_bodyfield',
'nd_title_h1_nolink',
'nd_title_h1_link',
'nd_title_h2_nolink',
'nd_title_h2_link',
'nd_title_h2_block_nolink',
'nd_title_h2_block_link',
'nd_title_p_nolink',
'nd_title_p_link',
);
foreach ($formatters as $formatter) {
$theme_functions[$formatter] = array(
'variables' => array(
'field' => NULL,
),
);
}
// Vocabulary.
$vocab_formatters = array(
'nd_terms_per_vocabulary_space',
'nd_terms_per_vocabulary_linked_space',
'nd_terms_per_vocabulary_comma',
'nd_terms_per_vocabulary_linked_comma',
);
foreach ($vocab_formatters as $formatter) {
$theme_functions[$formatter] = array(
'variables' => array(
'field' => NULL,
),
'function' => 'nd_terms_per_vocabulary',
);
}
$theme_functions['nd'] = array(
'render element' => 'elements',
'template' => 'nd',
'path' => $path . '/templates',
);
return $theme_functions;
}