Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Showing with 5 additions and 0 deletions.
  1. +5 −0 blocks/navigation/renderer.php
5 blocks/navigation/renderer.php
View
@@ -77,6 +77,11 @@ protected function navigation_node($items, $attrs=array(), $expansionlimit=null,
$isexpandable = (empty($expansionlimit) || ($item->type > navigation_node::TYPE_ACTIVITY || $item->type < $expansionlimit) || ($item->contains_active_node() && $item->children->count() > 0));
$isbranch = $isexpandable && ($item->children->count() > 0 || ($item->has_children() && (isloggedin() || $item->type <= navigation_node::TYPE_CATEGORY)));
+ // Skip elements which have no content and no action - no point in showing them
+ if (!$isexpandable && empty($item->action)) {
+ continue;
+ }
+
$hasicon = ((!$isbranch || $item->type == navigation_node::TYPE_ACTIVITY || $item->type == navigation_node::TYPE_RESOURCE) && $item->icon instanceof renderable);
if ($hasicon) {
Please sign in to comment.
Something went wrong with that request. Please try again.