Commit d2fcbcc0 by artur

Hide menu container tag when items is empty

parent 28949b3a
......@@ -166,10 +166,12 @@ class Menu extends Widget
$this->params = Yii::$app->request->getQueryParams();
}
$items = $this->normalizeItems($this->items, $hasActiveChild);
if (!empty($items)) {
$options = $this->options;
$tag = ArrayHelper::remove($options, 'tag', 'ul');
echo Html::tag($tag, $this->renderItems($items), $options);
}
}
/**
* Recursively renders the menu items (without the container tag).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment