allow string as button for in menu

This commit is contained in:
Uwe Steinmann 2025-11-08 19:42:11 +01:00
parent 55e6ce1b9b
commit 3c72b1f00c
2 changed files with 20 additions and 12 deletions

View File

@ -654,6 +654,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
<ul class="dropdown-menu">
';
foreach($button['menuitems'] as $menuitem) {
if(is_array($menuitem)) {
$content .= '
<li><a';
if(!empty($menuitem['link']))
@ -662,6 +663,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$content .= ' onclick="'.$menuitem['onclick'].'"';
$content .= '>'.$menuitem['label'].'</a><li>
';
} else {
$content .= $menuitem;
}
}
$content .= '
</ul>

View File

@ -659,6 +659,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
<div class="dropdown-menu">
';
foreach($button['menuitems'] as $menuitem) {
if(is_array($menuitem)) {
$content .= '
<a class="dropdown-item"';
if(!empty($menuitem['link']))
@ -667,6 +668,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$content .= ' onclick="'.$menuitem['onclick'].'"';
$content .= '>'.$menuitem['label'].'</a>
';
} else {
$content .= $menuitem;
}
}
$content .= '
</div>