diff options
-rw-r--r-- | jquery_drawer.module | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module index cbb4b89..a3d2a15 100644 --- a/jquery_drawer.module +++ b/jquery_drawer.module @@ -53,6 +53,12 @@ function jquery_drawer_block($op = 'list', $delta = 0, $edit = array()) { '#description' => t('Select this option if you plan to manually provide the drawer box.'), '#default_value' => variable_get('jquery_drawer_drw', '0'), ); + $form['jquery_drawer_link'] = array( + '#type' => 'textfield', + '#title' => t('Base link path (useful for views).'), + '#description' => t('Set the base link for nodes listed in drawer.'), + '#default_value' => variable_get('jquery_drawer_link', 'node'), + ); return $form; case 'save': @@ -139,12 +145,13 @@ function theme_jquery_drawer($menu) { function jquery_drawer_page($tid = NULL) { $output = ''; $nodes = taxonomy_select_nodes(array($tid)); + $base = variable_get('jquery_drawer_link', 'node'); $output .= '<ul id="drw_item" class="hidden">'; // First render all nodes whose parent is $term while ($node = db_fetch_object($nodes)) { $link['title'] = $node->title; - $link['href'] = 'node/'. $node->nid; + $link['href'] = "$base/". $node->nid; $output .= theme('jquery_drawer_link', $link); } |