fix html error in menu item if attributes are passed

This commit is contained in:
Uwe Steinmann 2023-03-13 10:26:22 +01:00
parent d127b137ba
commit c099903f12

View File

@ -576,11 +576,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if(!empty($submenuitem['divider'])) {
$content .= " <li class=\"divider\"></li>\n";
} else {
$content .= "<li><a".(isset($menuitem['link']) ? " href=\"".$menuitem['link']."\"" : "").(isset($menuitem['target']) ? ' target="'.$menuitem['target'].'"' : '').">";
$content .= "<li><a".(isset($menuitem['link']) ? " href=\"".$menuitem['link']."\"" : "").(isset($menuitem['target']) ? ' target="'.$menuitem['target'].'"' : '');
if(!empty($menuitem['attributes']))
foreach($menuitem['attributes'] as $attr)
$content .= ' '.$attr[0].'="'.$attr[1].'"';
$content .= $menuitem['label']."</a></li>";
$content .= ">".$menuitem['label']."</a></li>";
}
}
}