This project is read-only.

OrchardFeature in themes with code

Topics: Writing themes
Oct 27, 2011 at 9: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?

Oct 27, 2011 at 10:38 PM

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

Oct 27, 2011 at 11: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!