You are here

function contemplate_system_settings in Content Templates (Contemplate) 6

Same name and namespace in other branches
  1. 5 contemplate.module \contemplate_system_settings()
  2. 7 contemplate.module \contemplate_system_settings()
1 string reference to 'contemplate_system_settings'
contemplate_menu in ./contemplate.module
Implementation of hook_menu().

File

./contemplate.module, line 94
Create templates to customize teaser and body content.

Code

function contemplate_system_settings() {
  $form = array();
  $form['contemplate_remove_node_content'] = array(
    '#type' => 'checkbox',
    '#title' => 'Remove $node->content from variable list.',
    '#description' => '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' => 'Max recursion depth',
    '#description' => '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' => 'Process template before indexing for search',
    '#description' => '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);
}