function ctools_node_content_content_type_edit_form
Returns an edit form for the custom type.
File
-
plugins/
content_types/ node_context/ node_content.inc, line 143
Code
function ctools_node_content_content_type_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
$form['leave_node_title'] = array(
'#type' => 'checkbox',
'#default_value' => !empty($conf['leave_node_title']),
'#title' => t('Leave node title'),
'#description' => t('Advanced: if checked, do not touch the node title; this can cause the node title to appear twice unless your theme is aware of this.'),
);
$form['link'] = array(
'#title' => t('Link title to node'),
'#type' => 'checkbox',
'#default_value' => $conf['link'],
'#description' => t('Check here to make the title link to the node.'),
);
$form['links'] = array(
'#type' => 'checkbox',
'#default_value' => $conf['links'],
'#title' => t('Include node links for "add comment", "read more" etc.'),
);
$form['no_extras'] = array(
'#type' => 'checkbox',
'#default_value' => $conf['no_extras'],
'#title' => t('No extras'),
'#description' => t('Check here to disable additions that modules might make to the node, such as file attachments and CCK fields; this should just display the basic teaser or body.'),
);
$form['identifier'] = array(
'#type' => 'textfield',
'#default_value' => $conf['identifier'],
'#title' => t('Template identifier'),
'#description' => t('This identifier will be added as a template suggestion to display this node: node--panel--IDENTIFIER.tpl.php. Please see the Drupal theming guide for information about template suggestions.'),
);
$entity = entity_get_info('node');
$build_mode_options = array();
foreach ($entity['view modes'] as $mode => $option) {
$build_mode_options[$mode] = $option['label'];
}
$form['build_mode'] = array(
'#title' => t('Build mode'),
'#type' => 'select',
'#description' => t('Select a build mode for this node.'),
'#options' => $build_mode_options,
'#default_value' => $conf['build_mode'],
);
return $form;
}