aboutsummaryrefslogtreecommitdiff
path: root/jquery_drawer.module
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2014-09-23 10:51:37 -0300
committerSilvio <silvio@socioambiental.org>2014-09-23 10:51:37 -0300
commit4ac4b9abc82abeadd65130323e523fe03c31d42d (patch)
tree86ff5942b8f1ddffd6ae4af11fcaa6d25bd7cdd3 /jquery_drawer.module
parentc9d54bde90e679699d8044ad8547cf3810597532 (diff)
downloadjquery_drawer-4ac4b9abc82abeadd65130323e523fe03c31d42d.tar.gz
jquery_drawer-4ac4b9abc82abeadd65130323e523fe03c31d42d.tar.bz2
Print default text only if there's no child content
Diffstat (limited to 'jquery_drawer.module')
-rw-r--r--jquery_drawer.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module
index 169a74b..c0481e0 100644
--- a/jquery_drawer.module
+++ b/jquery_drawer.module
@@ -229,6 +229,7 @@ function jquery_drawer_page($tid = NULL) {
static $cache = array();
if (!isset($cache[$tid])) {
+ $found = NULL;
$output = '';
$nodes = jquery_drawer_select_nodes($tid);
$base = variable_get('jquery_drawer_link', 'node');
@@ -238,6 +239,7 @@ function jquery_drawer_page($tid = NULL) {
// First render all nodes whose parent is $term
while ($node = db_fetch_object($nodes)) {
path_nodeapi($node,'load','');
+ $found = TRUE;
$link['title'] = $node->title;
$link['href'] = ($node->path?$node->path:"$base/". $node->nid);
$output .= theme('jquery_drawer_link', $link);
@@ -246,10 +248,12 @@ function jquery_drawer_page($tid = NULL) {
// Add other nodes
if (is_array($tree) && !empty($tree)) {
foreach ($tree as $term) {
+ $found = TRUE;
$output .= theme('taxonomy_node_tree_list', $term, 'jquery_drawer', 'hidden', $base);
}
}
- else {
+
+ if ($found == NULL) {
$output .= t('No content exists for this topic yet.');
}