aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2010-02-02 17:17:59 -0200
committerSilvio <silvio@devlet.com.br>2010-10-14 18:23:24 -0300
commit48324f1e2c4d4e62ccd62ebfb3a8fcf9df6bc331 (patch)
treee280dd468e7979fb0c9a17180b8e8a415f4bd497
parentdd6881c831b7dec9d2c188567ed7a856cd192f03 (diff)
downloadjquery_drawer-48324f1e2c4d4e62ccd62ebfb3a8fcf9df6bc331.tar.gz
jquery_drawer-48324f1e2c4d4e62ccd62ebfb3a8fcf9df6bc331.tar.bz2
Adding variable jquery_drawer_link
-rw-r--r--jquery_drawer.module9
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);
}