hasChildren() && ($item->level < $params['endLevel']); $hasParent = $item->hasParent(); $itemParams = $item->getParams(); $class = 'item-' . $item->id; $mi_class = 'nav-link'; $attributes = array(); if ($hasParent) { $mi_class .= " dropdown-item"; } else { // $class .= " nav-item"; } $class .= " nav-item"; if ($hasChildren) { $class .= " dropdown"; $mi_class .= " dropdown-toggle"; $attributes["role"] = 'button'; } if ($item->type === 'separator') { $class .= ' divider'; } if ($item->id == $default_id) { $class .= ' default'; } if ($item->id == $active_id || ($item->type === 'alias' && $itemParams->get('aliasoptions') == $active_id)) { $class .= ' current'; } if ($item->browserNav == 1) { $attributes['target'] = '_blank'; $attributes['rel'] = 'noopener noreferrer'; if ($item->anchor_rel == 'nofollow') { $attributes['rel'] .= ' nofollow'; } } elseif ($item->browserNav == 2) { $options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $params->get('window_open'); $attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;"; } echo '