mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-20 19:03:25 +08:00
Store default location for Blog part in initial settings
--HG-- branch : dev
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
using Orchard.Data.Migration;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Blogs.Models;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Builders;
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.Blogs.DataMigrations {
|
||||
public class BlogsDataMigration : DataMigrationImpl {
|
||||
@@ -22,5 +27,14 @@ namespace Orchard.Blogs.DataMigrations {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(Blog).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
}));
|
||||
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user