This project is read-only.

How to include Css files from other Modules so the menu items uses their classes

Topics: Features, General
Mar 30, 2012 at 7:38 PM

(Posted in but I thought I might have more luck here)

I have a number of modules that I've set up to self-populate known Advanced Menus when they are enabled in Orchard. I do this through implementation of IOrchardShellEvents. 

The menu items are adding fine and it appears to work quite recipe required :). My problem is, I want the module to be able to customize the CssClass that appears in the menu item (which I can do), but I don't want the theme to somehow have to pre-define all of the available present and future menu item css classes that I'll need. 




Menu Item A - comes from Module A and uses the "module-A-menuitem" class

Menu Item Z - comes from Module Z and uses the "module-Z-menuitem" class

Module A has a Css stylesheet in it's resource manifest that defines "module-A-menuitem" which turns the menu item purple and adds an image icon

Module Z has a Css stylesheet in it's resource manifest that defines "module-Z-menuitem" which turns the menu item blue and adds an image icon



So my question is..... How can I get it so my stylesheets for Module A and Module B are always included so that the menu items can render properly...