3

I am using Umbraco 7. I have created a custom section using

namespace MyUmbraco.Sections
{
    [Application("CustomSection","mySection","myicon",8)]
    public class CustomSection: IApplication
    {
    }
}

I am able to create nodes in my section, CRUD operations for those items. only thing in my example is, i am unable to add a custom icon for that section, if i use built in icons, it works fine. I have also added icon image to /umbraco/Images/Tray folder and css in umbracoGUI.css as

#tray .myicon{

    background-image:url('../Images/Tray/myicon.png');

}

is there something I am missing?

Chaitanya Gadkari
  • 2,669
  • 4
  • 30
  • 54

1 Answers1

3

I had referred to the solution provided in http://www.nibble.be/?p=440 for custom section and umbraco forum https://our.umbraco.org/forum/developers/extending-umbraco/2265-adding-custom-tray-icon for custom icon to my section. But I found out that umbraco backend does not load css from

/umbraco/Css/umbracoGui.css

, but from

/umbraco/assets/css/umbraco.css

. also we have to set the content property and not background-image property as

.myicon::before{
    content:url('../../Images/Tray/myicon.png');
}

I don't know if this change is for version 7 of umbraco, but this worked out for me.

Chaitanya Gadkari
  • 2,669
  • 4
  • 30
  • 54