function nodesymlinks_settings in NodeSymlinks 6
Same name and namespace in other branches
- 7 nodesymlinks.admin.inc \nodesymlinks_settings()
Admin settings form
1 string reference to 'nodesymlinks_settings'
- nodesymlinks_menu in ./
nodesymlinks.module - Implementation of hook_menu().
File
- ./
nodesymlinks.admin.inc, line 67
Code
function nodesymlinks_settings($form_state) {
$form = array();
$form['breadcrumbs'] = array(
'#type' => 'fieldset',
'#title' => 'Breadcrumb settings',
);
$form['breadcrumbs']['nodesymlinks_crumbs_include_home'] = array(
'#type' => 'checkbox',
'#title' => t('Breadcrumbs starts with "Home" link'),
'#default_value' => variable_get('nodesymlinks_crumbs_include_home', 1),
);
$form['breadcrumbs']['nodesymlinks_crumbs_lastcrumb'] = array(
'#type' => 'radios',
'#title' => t('Last breadcrumb is'),
'#options' => array(
'parent' => t('Parent of the current menu item'),
'current_plain' => t('Current menu item title'),
'current_link' => t('Current menu item as link'),
),
'#default_value' => variable_get('nodesymlinks_crumbs_lastcrumb', 'parent'),
);
$form['nodeform'] = array(
'#type' => 'fieldset',
'#title' => 'Node form',
);
$form['nodeform']['nodesymlinks_check_menuitem'] = array(
'#type' => 'checkbox',
'#title' => t('Node menu item check'),
'#description' => t('Check if the node menu item is filled when some node symlink is defined. When enabled it will' . ' warn you every time when you try to add nodesymlink leaving <b>Menu link title</b> field empty.'),
'#default_value' => variable_get('nodesymlinks_check_menuitem', 1),
);
$form['pathauto'] = array(
'#type' => 'fieldset',
'#title' => 'Pathauto',
'#description' => t('These settings will be visible only when <a href="@url-project">@module</a> module is enabled on the <a href="@url-modules">Modules</a> page.', array(
'@module' => 'Pathauto',
'@url-project' => 'http://drupal.org/project/pathauto',
'@url-modules' => url('admin/build/modules'),
)),
);
if (module_exists('pathauto')) {
_nodesymlinks_include('pathauto');
$pathauto_url = nodesymlinks_pathauto_version() > 1 ? 'admin/build/path/patterns' : 'admin/build/path/pathauto';
$form['pathauto']['nodesymlinks_node_tokens'] = array(
'#type' => 'checkbox',
'#title' => t('Use node tokens'),
'#default_value' => variable_get('nodesymlinks_node_tokens', 0),
'#description' => t('When enabled, it allows you to use the <em>node tokens</em> inside the <a href="@url-pattern">nodesymlinks pathauto pattern</a>. However it will consume slightly more resources. So enable this only when you really need it.', array(
'@url-pattern' => url($pathauto_url),
)),
);
}
return system_settings_form($form);
}