Skip to main content
Topic: Admin menu icon (Read 1337 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Admin menu icon

Code: [Select]
'icon' => 'transparent.png',
Is in... almost all the entries of the menu.

Is it really necessary?
Can't we just drop it and use... I guess the css?
Bugs creator.
Features destroyer.
Template killer.

Re: Admin menu icon

Reply #1

I'd guess yes ... may have been some ie8 needed?

Re: Admin menu icon

Reply #2

Dunno...
But anyway, if the transparent icon is needed everywhere, we can just add it to the template instead of having it in the menu array I think... no?
Bugs creator.
Features destroyer.
Template killer.

Re: Admin menu icon

Reply #3

Code: [Select]
						if (isset($area['icon']))
$menu_context['sections'][$section_id]['areas'][$area_id]['icon'] = '<img ' . (isset($area['class']) ? 'class="' . $area['class'] . '" ' : 'style="background: none"') . ' src="' . $context['menu_image_path'] . '/' . $area['icon'] . '" alt="" />  ';
Right now the code allows you to pass an icon name and use that as the image or use the class name on the transparent image.  So its easy for addons to use a non-sprite image in the menu with icon.

I think you can remove it and just change that code around a bit, maybe isset($area['class']) do a sprite else isset($area['icon']) do an icon?  Could probably update the css as well, use a pseudo instead of the image tag for the class call.