Adding default body css classes when editing/displaying content items

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2013-02-27 15:11:52 -08:00
parent a6bf2e4517
commit c77b88809d
2 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,10 @@
<div class="edit-item">
@using Orchard.ContentManagement
@using Orchard.Utility.Extensions
@{
ContentItem contentItem = Model.ContentItem;
Html.AddPageClassNames("edit-" + contentItem.ContentType.HtmlClassify());
}
<div class="edit-item">
<div class="edit-item-primary">
@if (Model.Content != null) {
<div class="edit-item-content">

View File

@ -5,6 +5,7 @@
}
var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify();
Html.AddPageClassNames("display-" + contentTypeClassName);
}
<article class="content-item @contentTypeClassName">
<header>