Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions source/plg_system_t3/includes/menu/t3bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function render()
ob_start();
T3BootstrapTpl::render($this->getList());
$this->menu = ob_get_contents();
ob_end_clean();
ob_end_clean();
}

return $this->menu;
}

Expand All @@ -59,11 +59,20 @@ function getList()

// Get active menu item
$items = $menu->getItems('menutype', $this->menutype);
$hidden_parents = array();
$lastitem = 0;

if ($items) {
foreach ($items as $i => $item) {

// Exclude item with menu item option 'Display in Menu' set to 'No' - #522
if (($item->params->get('menu_show', 1) == 0) || in_array($item->parent_id, $hidden_parents))
{
$hidden_parents[] = $item->id;
unset($items[$i]);
continue;
}

$item->deeper = false;
$item->shallower = false;
$item->level_diff = 0;
Expand Down
4 changes: 0 additions & 4 deletions source/plg_system_t3/includes/menu/t3bootstrap.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ static function render($list)
<ul class="nav navbar-nav">
<?php
foreach ($list as &$item) :
//intergration with new params joomla 3.6.x (menu_show)
$menu_show = (int)$item->params->get('menu_show', 1);
if ($menu_show!=1)
continue;
$class = 'item-' . $item->id;
if ($item->id == $active_id) {
$class .= ' current';
Expand Down