You are here

function _tableofcontents_nodetype_form_alter_submit in Table of Contents 7.2

Same name and namespace in other branches
  1. 6.3 tableofcontents.admin.inc \_tableofcontents_nodetype_form_alter_submit()
  2. 7 tableofcontents.admin.inc \_tableofcontents_nodetype_form_alter_submit()

Save the user selection.

1 string reference to '_tableofcontents_nodetype_form_alter_submit'
_tableofcontents_nodetype_form_alter in ./tableofcontents.admin.inc
Add a field to the node type so one can define the automatic table of content type on a per type basis.

File

./tableofcontents.admin.inc, line 434
Include the different setup (administration forms) for the table of contents module.

Code

function _tableofcontents_nodetype_form_alter_submit($form, &$form_state) {
  variable_set('nodetype_toc_automatic_' . $form['#node_type']->type, $form_state['values']['toc_automatic']);
  variable_set('nodetype_toc_vtoc_' . $form['#node_type']->type, $form_state['values']['vtoc']);
  variable_set('nodetype_toc_remove_from_teaser_' . $form['#node_type']->type, $form_state['values']['remove_from_teaser']);
}