Google Groups

Re: [silverstripe-dev] Re: CMS Menu Icons


Martimiz Aug 3, 2012 3:43 AM
Posted in group: SilverStripe Core Development

Hi

At the moment, this is done using styles: framework/admin/templates/Includes/LeftAnMain.ss creates a

<span class="icon icon-16 icon-$Code">&nbsp;</span>

where $Code seems to insert the classname. Then in admin/images/menu-icons there are a couple of sprites containing the icons, and in admin/cms/screen.css they are set:

.icon.icon-16 { width: 16px; height: 16px; background: url('../images/menu-icons/16x16-sb173d358c2.png'); }
.icon.icon-16.icon-reportadmin { background-position: 0 -32px; }

So you could probably use a custom css (init?) doing

.icon.icon-16.icon-myclass { background: url('/xxx/xxx/someicon.png.png'); }

Maybe an API would make things somewhat more clear?

Martine