/[drupal]/contributions/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.admin.inc
ViewVC logotype

Contents of /contributions/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Thu Mar 12 18:51:39 2009 UTC (8 months, 2 weeks ago) by mgn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +8 -0 lines
File MIME type: text/x-php
#359319: by stevenghines, radj and MGN: new feature provides option to append
node title at end of breadcrumb trail.
#395082 by kndr and MGN: correctly set weight of taxonomy_breadcrumb module to be greater than the taxonomy module.
1 <?php
2 // $Id: taxonomy_breadcrumb.admin.inc,v 1.1 2009/01/12 02:19:26 mgn Exp $
3
4 /**
5 * @file
6 * Administration pages for taxonomy_breadcrumb
7 */
8
9 /**
10 * Settings page for module.
11 */
12 function taxonomy_breadcrumb_admin_settings() {
13 $form['settings'] = array(
14 '#type' => 'fieldset',
15 '#title' => t('Basic Settings'),
16 '#collapsible' => TRUE,
17 );
18
19 $form['settings']['taxonomy_breadcrumb_home'] = array(
20 '#type' => 'textfield',
21 '#title' => t('Home breadcrumb text'),
22 '#default_value' => variable_get('taxonomy_breadcrumb_home', ''),
23 '#description' => t('Text to display at top of breadcrumb trail. Typically home or your site name. Leave blank to have no home breadcrumb.'),
24 );
25
26 $form['settings']['taxonomy_breadcrumb_show_current_term'] = array(
27 '#type' => 'checkbox',
28 '#title' => t('Show current term in breadcrumb trail?'),
29 '#default_value' => variable_get('taxonomy_breadcrumb_show_current_term', TRUE),
30 '#description' => t('When enabled, the lightest term associated with node is shown as the last breadcrumb in the breadcrumb trail. When disabled, the only terms shown in the breadcrumb trail are parent terms (if any parents exist). The recommended setting is enabled.'),
31 );
32
33 $form['settings']['taxonomy_breadcrumb_include_node_title'] = array(
34 '#type' => 'checkbox',
35 '#title' => t('Show current node title in breadcrumb trail?'),
36 '#default_value' => variable_get('taxonomy_breadcrumb_include_node_title', FALSE),
37 '#description' => t('When enabled and when viewing a node, the node\'s title will be shown as the last breadcrumb in the breadcrumb trail.'),
38 '#weight' => 30,
39 );
40
41 $form['advanced'] = array(
42 '#type' => 'fieldset',
43 '#description' => 'Use these advanced settings to control which node types taxonomy based breadcrumbs will be generated for. This allows taxonomy_breadcrumb to peacefully coexist with modules that define their own breadcrumbs, such as the book module. For typical drupal configurations, administrators will not need to modify these settings; however, if user contributed modules are enabled you may need to fine tune taxonomy_breadcrumb here.',
44 '#title' => t('Advanced Settings'),
45 '#collapsible' => TRUE,
46 '#collapsed' => TRUE,
47 );
48
49 $form['advanced']['taxonomy_breadcrumb_include_nodes'] = array(
50 '#type' => 'radios',
51 '#title' => t('Include or exclude the following node types'),
52 '#default_value' => variable_get('taxonomy_breadcrumb_include_nodes', FALSE),
53 '#options' => array(TRUE => t('Include'), FALSE => t('Exclude')),
54 '#weight' => 10,
55 );
56
57 $tb_types = (array) variable_get('taxonomy_breadcrumb_node_types', TAXONOMY_BREADCRUMB_NODE_TYPES_DEFAULT);
58 $default = array();
59 foreach ($tb_types as $index => $value) {
60 if ($value) {
61 $default[] = $index;
62 }
63 }
64
65 $form['advanced']['taxonomy_breadcrumb_node_types'] = array(
66 '#type' => 'checkboxes',
67 '#multiple' => TRUE,
68 '#title' => t('Node types to include or exclude'),
69 '#default_value' => $default,
70 '#options' => array_map('check_plain', node_get_types('names')),
71 '#description' => t('A list of node types to include or exclude applying taxonomy based breadcrumbs to.'),
72 '#weight' => 20,
73 );
74
75 return system_settings_form($form);
76 }

  ViewVC Help
Powered by ViewVC 1.1.2