mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Swapped out Orchard.Core's Common Routable for the work in progress replacement, Orchard.Core's Routable (seperate core module now)
--HG-- branch : dev
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Linq;
|
||||
using Orchard.Blogs.Models;
|
||||
using Orchard.Commands;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Core.Routable.Models;
|
||||
using Orchard.Security;
|
||||
using System.IO;
|
||||
using Orchard.Blogs.Services;
|
||||
using Orchard.Core.Navigation.Services;
|
||||
|
||||
@@ -55,8 +54,8 @@ namespace Orchard.Blogs.Commands {
|
||||
|
||||
var blog = _contentManager.New("Blog");
|
||||
blog.As<ICommonAspect>().Owner = admin;
|
||||
blog.As<RoutableAspect>().Slug = Slug;
|
||||
blog.As<RoutableAspect>().Title = Title;
|
||||
blog.As<IsRoutable>().Slug = Slug;
|
||||
blog.As<IsRoutable>().Title = Title;
|
||||
if ( !String.IsNullOrWhiteSpace(MenuText) ) {
|
||||
blog.As<MenuPart>().OnMainMenu = true;
|
||||
blog.As<MenuPart>().MenuPosition = _menuService.Get().Select(menuPart => menuPart.MenuPosition).Max() + 1 + ".0";
|
||||
@@ -98,8 +97,8 @@ namespace Orchard.Blogs.Commands {
|
||||
var post = _contentManager.New("BlogPost");
|
||||
post.As<ICommonAspect>().Owner = admin;
|
||||
post.As<ICommonAspect>().Container = blog;
|
||||
post.As<RoutableAspect>().Slug = Slugify(postName);
|
||||
post.As<RoutableAspect>().Title = postName;
|
||||
post.As<IsRoutable>().Slug = Slugify(postName);
|
||||
post.As<IsRoutable>().Title = postName;
|
||||
post.As<BodyAspect>().Text = item.Element("description").Value;
|
||||
_contentManager.Create(post);
|
||||
}
|
||||
|
Reference in New Issue
Block a user