function contemplate_system_settings in Content Templates (Contemplate) 7
Same name and namespace in other branches
- 5 contemplate.module \contemplate_system_settings()
- 6 contemplate.module \contemplate_system_settings()
build the system settings form
1 string reference to 'contemplate_system_settings'
- contemplate_menu in ./
contemplate.module - Implements hook_menu().
File
- ./
contemplate.module, line 132 - Create templates to customize teaser and body content.
Code
function contemplate_system_settings() {
$form = array();
$form['contemplate_remove_node_content'] = array(
'#type' => 'checkbox',
'#title' => t('Remove $node->content from variable list.'),
'#description' => t('When this is enabled you will not see all available variables while creating/editing content templates. When this is disabled you may have Fatal Errors due to going over PHP memory limit. Even though the contents of $node->content is not displayed in the variable list, they are still avaible to be used in the Content Template, they just overflow PHPs memory limit when used with many CCK Fields.'),
);
if (variable_get('contemplate_remove_node_content', FALSE)) {
$form['contemplate_remove_node_content']['#attributes'] = array(
'checked' => 'true',
);
}
$form['contemplate_max_recursion_depth'] = array(
'#type' => 'textfield',
'#title' => t('Max recursion depth'),
'#description' => t('How far into the node object should contemplate look? Having this set too high could cause PHP memory errors. If the above checkbox "Remove $node->content from variable list" is checked this won\'t have much of an affect.'),
'#default_value' => variable_get('contemplate_max_recursion_depth', 10),
'#size' => 5,
);
$form['contemplate_before_search_index'] = array(
'#type' => 'checkbox',
'#title' => t('Process template before indexing for search'),
'#description' => t('Do you want to process the template before the nodes are indexed for search?'),
);
if (variable_get('contemplate_before_search_index', FALSE)) {
$form['contemplate_before_search_index']['#attributes'] = array(
'checked' => 'true',
);
}
return system_settings_form($form);
}