Jump to content

Recommended Posts

Posted

SIr Jupeto help me on how to put the Admin Menu's on a Drop Down List

hmm how about on Sub Menu?

here's the code for Admin's Menu

<?php if (!empty($adminMenuItems) && Flux::config('AdminMenuNewStyle')): ?>
<form name="form1">
<strong>Admin</strong>:
<select name="menu1" onChange="window.location.href=this.value">
<option value="javascript:void(0);">Choose Menu</option>
<?php foreach ($adminMenuItems as $menuItem) : ?>
<option value="<?php echo $menuItem['url']; ?>"><?php echo $menuItem['name']; ?></option>
<?php endforeach; ?>
</select>
</form>
<?php endif ?>

Posted (edited)

Here you go.

<?php if (!defined('FLUX_ROOT')) exit; ?>
<?php $subMenuItems = $this->getSubMenuItems(); $menus = array() ?>
<?php if (!empty($subMenuItems)): ?>
<div id="submenu">Menu:
<select onchange="window.location.href=this.value">
<?php foreach ($subMenuItems as $menuItem): ?>
 <?php echo sprintf('<option value="%s"%s>%s</option>',
  $this->url($menuItem['module'], $menuItem['action']),
  $params->get('module') == $menuItem['module'] && $params->get('action') == $menuItem['action'] ? ' selected="selected"' : '',
  htmlspecialchars($menuItem['name'])); ?>
<?php endforeach ?>
</select>
</div>
<?php endif ?>

Edited by Choko Designoper

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...