mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
14 lines
609 B
Plaintext
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 } |