function nd_content_build_modes in Node displays 6.3
Same name and namespace in other branches
- 6 nd.module \nd_content_build_modes()
- 6.2 nd.module \nd_content_build_modes()
- 7 nd.module \nd_content_build_modes()
Implementation of hook_content_build_modes().
File
- ./
nd.module, line 74 - Node displays.
Code
function nd_content_build_modes() {
$build_modes = array(
'nd' => array(
'title' => t('Node displays'),
'build modes' => array(
'full' => array(
'title' => t('Full node'),
'weight' => -1,
),
'teaser' => array(
'title' => t('Teaser'),
'weight' => 1,
),
'sticky' => array(
'title' => t('Sticky'),
'weight' => 2,
'views style' => TRUE,
),
NODE_BUILD_RSS => array(
'title' => t('RSS'),
'weight' => 3,
),
),
),
);
// Also add this here, so other modules (like views_attach)
// can profit from custom build modes from the UI.
$db_build_modes = variable_get('nd_build_modes', array());
foreach ($db_build_modes as $key => $build_mode) {
$build_modes[$key] = array(
'title' => $build_mode,
'build modes' => array(
$key => array(
'title' => $build_mode,
'views style' => TRUE,
),
),
);
}
return $build_modes;
}