Jump to content

Help - FluxCP Sub Menu


Recommended Posts


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   8
  • Joined:  03/03/12
  • Last Seen:  

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 ?>

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   18
  • Joined:  01/28/12
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...