Don't like the textlinks in the levelmenu

Postdate: April 15 2012
Category: Created Modules
Applies to: 2.0x

If you don't like the textlinks "Add Item" and "Edit Item" in the admin levelmenu then use my improvements.

Edit the template:

Open /modules/YOUR_MODULE/templates/admin_levelmenu.php and replace the whole code with this one:

{foreach from=$itemlist item="item"}
<div class="itemmenucontainer">
<div class="itemoverflow">
  <p class="edit-item"><a class="itemlink" href="{$item->url}&quot;>{$item->label}  ({$item->nbitems})</a></p>
  <p class="add-item">{$item->addlink}</p>
<br class="clearleft" />

The CSS:

You have to add some CSS somewhere. My suggesttion wouild be to add a stylesheetlink at the top of the template.

<link href="/css/adminstyles.css" rel="stylesheet" type="text/css" media="screen" />

As a starting point you can use this CSS:

p#add-blocks a, p#edit-blocks a {
  display:block; width:200px;
  padding:5px; margin-bottom:25px;
  text-align:center; font-weight:bold;  color:#EEE;
  border:1px solid #999;
p#edit-blocks a span {font-weight:normal;}

p#add-blocks a  {background-color:#91B7B9;}
p#add-blocks a  {box-shadow:inset 0 -15px 15px rgba(80,130,130, 0.5); -moz-box-shadow:inset 0 -15px 15px rgba(80,130,130, 0.5);}
p#edit-blocks a {box-shadow:inset 0 -15px 15px rgba(80,80,80, 0.6);   -moz-box-shadow:inset 0 -15px 15px rgba(80,80,80, 0.6);}

Will look like this: