OrchardFeature in themes with code

Topics: Writing themes
Developer
Oct 27, 2011 at 8:51 PM

Is there something similar for "smart" themes like the OrchardFeature attribute for modules? I'd like a class in my theme to be excluded from compilation if the theme is not set as current but OrchardFeature doesn't work, since a theme's EnableState is always true in the ShellFeatureStateRecord table. Currently I'm using a workaround by checking the current theme's name, but that's not ideal.

Any thoughts?

Coordinator
Oct 27, 2011 at 9:38 PM

Actually, you should be able to enable and disable themes independently from the current theme setting. Am I misunderstanding?

Developer
Oct 27, 2011 at 10:04 PM

No, you were understanding just right, but I wasn't aware of that option being there. Must be a problem with my screen I think :-).

Thanks for your help!