Files
Orchard/src/Orchard.Web/Modules/Orchard.Layouts/Views/Elements/Html.cshtml
T

14 lines
609 B
Plaintext

@using Orchard.DisplayManagement.Shapes
@using Orchard.Layouts.Helpers
@{
// Only render the surrounding div if there are any attributes to be rendered.
var commonAttributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
var tagBuilder = commonAttributes.Any() ? new OrchardTagBuilder("div") : default(OrchardTagBuilder);
if (tagBuilder != null) {
tagBuilder.MergeAttributes(commonAttributes);
}
}
@if (tagBuilder != null) { @tagBuilder.StartElement }
@Html.Raw(Model.ProcessedContent)
@if (tagBuilder != null) { @tagBuilder.EndElement }