mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Getting the live writer link tags for Blogs (back up and) under the Remote Blog Publishing feature
--HG-- branch : dev
This commit is contained in:
@@ -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<BlogPart> {
|
||||
protected override DriverResult Display(BlogPart part, string displayType, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_Blogs_RemotePublishing", shape => shape.Slug(part.Slug));
|
||||
}
|
||||
}
|
||||
}
|
@@ -69,6 +69,7 @@
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Drivers\BlogArchivesPartDriver.cs" />
|
||||
<Compile Include="Drivers\BlogPagerPartDriver.cs" />
|
||||
<Compile Include="Drivers\RemoteBlogPublishingDriver.cs" />
|
||||
<Compile Include="Drivers\RecentBlogPostsPartDriver.cs" />
|
||||
<Compile Include="Handlers\BlogArchivesPartHandler.cs" />
|
||||
<Compile Include="Handlers\RecentBlogPostsPartHandler.cs" />
|
||||
@@ -108,7 +109,6 @@
|
||||
<Compile Include="Services\IBlogPostService.cs" />
|
||||
<Compile Include="Services\IBlogService.cs" />
|
||||
<Compile Include="Services\XmlRpcHandler.cs" />
|
||||
<Compile Include="RemoteBlogPublishingShapes.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Admin\images\draft.gif" />
|
||||
@@ -156,7 +156,7 @@
|
||||
<None Include="Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<Content Include="Views\RemoteBlogPublishing.cshtml" />
|
||||
<Content Include="Views\Parts\Blogs.RemotePublishing.cshtml" />
|
||||
<Content Include="Views\Parts\Blogs.BlogArchives.cshtml" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Blogs.RecentBlogPosts.cshtml" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Blogs.BlogArchives.cshtml" />
|
||||
|
@@ -20,8 +20,10 @@
|
||||
<Match ContentType="Blog">
|
||||
<Match DisplayType="Detail">
|
||||
<!-- blog posts currently added to the blog within the controller into Content:5 <Place Parts_Blogs_BlogPost_List="Content:5" />-->
|
||||
<!-- Parts_Blogs_RemotePublishing is made available with the "Remote Blog Publishing" feature -->
|
||||
<Place Parts_Blogs_Blog_Pager="Content:after"
|
||||
Parts_Blogs_Blog_Description="Content:before" />
|
||||
Parts_Blogs_Blog_Description="Content:before"
|
||||
Parts_Blogs_RemotePublishing="Content"/>
|
||||
</Match>
|
||||
<Match DisplayType="DetailAdmin">
|
||||
<Place Parts_Blogs_BlogPost_List_Admin="Content:5"
|
||||
|
@@ -1,16 +0,0 @@
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.Environment.Extensions;
|
||||
|
||||
namespace Orchard.Blogs {
|
||||
[OrchardFeature("Remote Blog Publishing")]
|
||||
public class RemoteBlogPublishingShapes : IShapeTableProvider {
|
||||
public void Discover(ShapeTableBuilder builder) {
|
||||
builder.Describe("Content__Blog")
|
||||
.OnDisplaying(displaying => {
|
||||
if (displaying.ShapeMetadata.DisplayType == "Detail") {
|
||||
displaying.ShapeMetadata.Wrappers.Add("RemoteBlogPublishing");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@@ -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;
|
||||
|
@@ -4,4 +4,3 @@
|
||||
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)
|
Reference in New Issue
Block a user