Orchard Gems: module name class on the html tag
Proper styling often takes up a big piece of development time, when we're hunting pixels for hours, so that even users looking at the website through a refrigerator's built-in console running some exotic fork of Windows CE can experience the same as an IE 6 user. Just kidding, it's worse than that. Anyway, there is a nice feature in Orchard that could help targeting elements of the layout: automatic classes on the html tag.
If you use a theme that doesn't override the core Document.cshtml template you'll notice that when you visit a page corresponding to a module (i.e. that goes through a custom controller) the html tag's class attribute will contain the name of the module. For example, the "Change Password" page has "orchard-users" appended. Nice indeed.
Actually the piece of code giving us this functionality is the Html.ClassForPage()
helper, what's in the Orchard.Mvc.Html.LayoutExtensions
class. On line 68 there is a comment from "heskew" (who I believe is Nathan Heskew):
//todo: (heskew) need ContentItem.ContentType
Meaning that also a class for the type of the current content item could be added. And we couldn't agree with Heskew more :-).