Custom icons in page tree


Hi! I've made a UIDescriptor for container pages that uses the class ContentTypeCssClassNames.Container to render the container icon in the page tree in edit mode. Now I want to do the same for another page type with a custom jpg file as icon. I can't find anywhere to specify this path so I guess I'll have to load a css file and then point to the correct class in the UIDescriptor file, but how do I load my custom css file in edit mode?

Regards Christer

Feb 04, 2014 10:16
Feb 04, 2014 10:27

Thanks! It took some time to figure out that the path is relative to ClientResources but now it works like a charm!

Feb 04, 2014 13:08

I fail to see the connection between adding new device in view dropdown with replacing default tree icons with custom ones? Can you please clarify a bit?

Feb 11, 2014 17:06

It was the part about adding the displayresolutions.css to clientResources that I could use for my own style sheet, ie this code:

    <add name="epi.cms.widgets.base" path="Styles/displayresolutions.css"
="Style" isMinified="false" />

Feb 12, 2014 10:05

The blog post about display resolutions explains how you can load a custom css file to the user interface. This can be used to add custom classes/icons for both display resolutions and content icons.

Feb 12, 2014 10:07

Thanx for the reply. I got that part so far. There is one thing that puzzles me though. The module.config and ClientResources exist on at least 3 locations within Modules, ModuleRepository, somewhere in Shell.

Where exactly to add custom .css file and which exactly module.config to use to register new .css?

Feb 12, 2014 10:16

You should add the css declaration to one of your own module.config files. If you look at the Alloy sample packages (both Web Forms and MVC) there is a client module in both projects with a module.config file placed in the root directory. Both JavaScript and Style sheets should be placed in the ClientResources folder for this module (check the registration for Styles/Styles.css).

Feb 17, 2014 16:35
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.