Breakpoints hit in proper order, first in Content.cshtml and then in Document.cshtml but ViewBag values were empty in the Document.cshtml. I tried different options but could not set the id and css class attribute in the main <body> tag. At last, I
used jQuery to update the body tag attributes.
In override Content.cshtml and used the following code to get the id and css classs:
dynamic c = Model.ContentItem;
var customId = c.CustomCss.CustomId;
var cssClass = c.CustomCss.CssClass;
Then with jQuery I used:
It may not be the best solution because when I look at the page source, page id and class is not there but when I check in Firebug, id and class is there in the page body.
It would be greate if this option is available in the new version of Orchard so that it can be easily implemented.