diff --git a/src/Orchard.Web/Core/Contents/Shapes.cs b/src/Orchard.Web/Core/Contents/Shapes.cs index cd3f6631c..22615f9df 100644 --- a/src/Orchard.Web/Core/Contents/Shapes.cs +++ b/src/Orchard.Web/Core/Contents/Shapes.cs @@ -5,10 +5,9 @@ namespace Orchard.Core.Contents { public class Shapes : IShapeTableProvider { public void Discover(ShapeTableBuilder builder) { builder.Describe("Content") - .Configure(descriptor => descriptor.Wrappers.Add("Content_ControlWrapper")) .OnCreated(created => { var content = created.Shape; - content.Main.Add(created.New.PlaceChildContent(Source: content)); + content.Child.Add(created.New.PlaceChildContent(Source: content)); }) .OnDisplaying(displaying => { ContentItem contentItem = displaying.Shape.ContentItem; @@ -21,6 +20,9 @@ namespace Orchard.Core.Contents { displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType); //Content.Summary-Page displaying.ShapeMetadata.Alternates.Add("Content_" + displaying.ShapeMetadata.DisplayType + "__" + contentItem.ContentType); + + if (!displaying.ShapeMetadata.DisplayType.Contains("Admin")) + displaying.ShapeMetadata.Wrappers.Add("Content_ControlWrapper"); } }); diff --git a/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml b/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml index 169374157..c34821b5b 100644 --- a/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml +++ b/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml @@ -3,9 +3,9 @@ @if (AuthorizedFor(Permissions.EditContent)) {
@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)
- @Display(Model.Main) + @Display(Model.Child)
} else { - @Display(Model.Main) + @Display(Model.Child) } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs index 266c454b1..f40a42daa 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs @@ -14,7 +14,7 @@ namespace Orchard.Widgets { }) .OnCreated(created => { var widget = created.Shape; - widget.Main.Add(created.New.PlaceChildContent(Source: widget)); + widget.Child.Add(created.New.PlaceChildContent(Source: widget)); }) .OnDisplaying(displaying => { ContentItem contentItem = displaying.Shape.ContentItem; diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml index bf5cab8f6..4454fccc3 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.ControlWrapper.cshtml @@ -3,9 +3,9 @@ @if (AuthorizedFor(Permissions.ManageWidgets)) {
@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)
- @Display(Model.Main) + @Display(Model.Child)
} else { - @Display(Model.Main) + @Display(Model.Child) } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml index 96d784427..fe7ad8123 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Wrapper.cshtml @@ -8,7 +8,7 @@

@title

@Display(Model.Header) - @Display.PlaceChildContent(Source: Model) + @Display(Model.Child) @if(Model.Footer != null) {