Using default autoroute patterns when none is provided

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-02-14 17:00:04 -08:00
parent c81f84587b
commit 721f9515fa
7 changed files with 19 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
7720f08bb9e98866409793a25bee77cf1b50f19a src/Orchard.Web/Modules/Orchard.Autoroute
74eb74be6abec40d498a24a767c48181bf4487cf src/Orchard.Web/Modules/Orchard.Autoroute
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
5de8193779b694ea153f485d0e777474309de310 src/Orchard.Web/Modules/Orchard.Tokens
31038e352d98ae14efcfa7bf6b6935c00644826b src/orchard.web/Modules/Orchard.Alias
10d63830915ed8e46bbdeaca1776abc6ee81fe0c src/orchard.web/Modules/Orchard.Projections
d89c8e7df5daa5d741b37572c2f75fe45962c3c9 src/orchard.web/Modules/Orchard.Projections
055083c158c00b185aa9e2aff1a76161f32fdcf7 src/orchard.web/modules/Orchard.Fields

View File

@@ -39,7 +39,11 @@ namespace Orchard.Blogs {
.WithPart("BlogPart")
.WithPart("CommonPart")
.WithPart("TitlePart")
.WithPart("AutoroutePart")
.WithPart("AutoroutePart", builder => builder
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Title', Pattern: '{Content.Slug}', Description: 'my-blog'}]")
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
.WithPart("MenuPart")
.WithPart("AdminMenuPart", p => p.WithSetting("AdminMenuPartTypeSettings.DefaultPosition", "2"))
);
@@ -51,7 +55,11 @@ namespace Orchard.Blogs {
.WithSetting("DateEditorSettings.ShowDateEditor", "true"))
.WithPart("PublishLaterPart")
.WithPart("TitlePart")
.WithPart("AutoroutePart")
.WithPart("AutoroutePart", builder => builder
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Blog and Title', Pattern: '{Content.Container.Path}/{Content.Slug}', Description: 'my-blog/my-post'}]")
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
.WithPart("BodyPart")
);

View File

@@ -2,8 +2,8 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.3.0
OrchardVersion: 1.3.0
Version: 1.4.0
OrchardVersion: 1.4.0
Description: The Orchard Blogs module is implementing basic blogging features.
FeatureDescription: A simple web log.
Dependencies: Shapes, Common, Feeds, Navigation, Orchard.Widgets, Orchard.jQuery, Orchard.PublishLater

View File

@@ -11,7 +11,11 @@ namespace Orchard.Pages {
.WithSetting("DateEditorSettings.ShowDateEditor", "true"))
.WithPart("PublishLaterPart")
.WithPart("TitlePart")
.WithPart("AutoroutePart")
.WithPart("AutoroutePart", builder => builder
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Title', Pattern: '{Content.Slug}', Description: 'my-page'}]")
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
.WithPart("BodyPart")
.Creatable());

View File

@@ -54,9 +54,6 @@
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
site setting set baseurl
theme activate "The Theme Machine"
autoroute create "Page" "Title" "{Content.Slug}" "about-us" true
autoroute create "Blog" "Title" "{Content.Slug}" "my-blog" true
autoroute create "BlogPost" "Blog and Title" "{Content.Container.Path}/{Content.Slug}" "my-blog/a-blog-post" true
blog create /Title:"Blog" /Homepage:true /Description:"This is your Orchard Blog."
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
</Command>

View File

@@ -26,7 +26,6 @@
<Migration features="*" />
<Command>
autoroute create "Page" "Title" "{Content.Slug}" "about-us" true
page create /Slug:"welcome-to-orchard" /Title:"Welcome to Orchard!" /Path:"welcome-to-orchard" /Homepage:true /Publish:true /Text:"Welcome To Orchard!"
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
</Command>

View File

@@ -49,9 +49,6 @@
widget create HtmlWidget /Title:"Second Leader Aside" /Zone:"TripelSecond" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget2" /UseLoremIpsumText:true
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
site setting set baseurl
autoroute create "Page" "Title" "{Content.Slug}" "about-us" true
autoroute create "Blog" "Title" "{Content.Slug}" "my-blog" true
autoroute create "BlogPost" "Blog and Title" "{Content.Container.Path}/{Content.Slug}" "my-blog/a-blog-post" true
page create /Slug:"welcome-to-orchard" /Title:"Welcome to Orchard!" /Path:"welcome-to-orchard" /Homepage:true /Publish:true /UseWelcomeText:true
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
theme activate "The Theme Machine"