diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs new file mode 100644 index 000000000..bf0e240b3 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs @@ -0,0 +1,14 @@ +using JetBrains.Annotations; +using Orchard.Blogs.Models; +using Orchard.ContentManagement.Drivers; +using Orchard.Environment.Extensions; + +namespace Orchard.Blogs.Drivers { + [UsedImplicitly] + [OrchardFeature("Orchard.Blogs.RemotePublishing")] + public class RemoteBlogPublishingDriver : ContentPartDriver { + protected override DriverResult Display(BlogPart part, string displayType, dynamic shapeHelper) { + return ContentShape("Parts_Blogs_RemotePublishing", shape => shape.Slug(part.Slug)); + } + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj index 2d593f17b..06b3b4d32 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj @@ -69,6 +69,7 @@ + @@ -108,7 +109,6 @@ - @@ -156,7 +156,7 @@ Designer - + diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info b/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info index 53d21e5ac..8e646183d 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Placement.info @@ -20,8 +20,10 @@ + + Parts_Blogs_Blog_Description="Content:before" + Parts_Blogs_RemotePublishing="Content"/> { - if (displaying.ShapeMetadata.DisplayType == "Detail") { - displaying.ShapeMetadata.Wrappers.Add("RemoteBlogPublishing"); - } - }); - } - } -} diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs index 61518a995..6ffd5b499 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs @@ -19,7 +19,7 @@ using Orchard.Blogs.Extensions; namespace Orchard.Blogs.Services { [UsedImplicitly] - [OrchardFeature("Remote Blog Publishing")] + [OrchardFeature("Orchard.Blogs.RemotePublishing")] public class XmlRpcHandler : IXmlRpcHandler { private readonly IBlogService _blogService; private readonly IBlogPostService _blogPostService; diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/RemoteBlogPublishing.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml similarity index 87% rename from src/Orchard.Web/Modules/Orchard.Blogs/Views/RemoteBlogPublishing.cshtml rename to src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml index 7738a4e9f..ce4545bc7 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/RemoteBlogPublishing.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml @@ -3,5 +3,4 @@ @{ RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest((string)Model.Slug) }); RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd((string)Model.Slug) }); -} -@Display.PlaceChildContent(Source: Model) \ No newline at end of file +} \ No newline at end of file