mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge
--HG-- branch : autoroute
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
cac46d72cc61f2c5f3d3d3dde3229f61edc56f8e src/Orchard.Web/Modules/Orchard.Alias
|
d91108343ff1259cd3e35b2c080eb166d024711b src/Orchard.Web/Modules/Orchard.Alias
|
||||||
547b36a689a1f75c90eba578e6c409cf4be62a92 src/Orchard.Web/Modules/Orchard.Autoroute
|
547b36a689a1f75c90eba578e6c409cf4be62a92 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||||
67bf9897ee9dd9483369aece729ad7c6f042941c src/Orchard.Web/Modules/Orchard.Forms
|
67bf9897ee9dd9483369aece729ad7c6f042941c src/Orchard.Web/Modules/Orchard.Forms
|
||||||
6033664adc404a22f311029b69fbf1e34dc4ff2a src/Orchard.Web/Modules/Orchard.Projections
|
6033664adc404a22f311029b69fbf1e34dc4ff2a src/Orchard.Web/Modules/Orchard.Projections
|
||||||
|
|||||||
@@ -54,9 +54,9 @@
|
|||||||
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
|
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
|
||||||
site setting set baseurl
|
site setting set baseurl
|
||||||
theme activate "The Theme Machine"
|
theme activate "The Theme Machine"
|
||||||
autoroute create "Page" "Title" "{Content.Slug}" "http://website.com/about-us" true
|
autoroute create "Page" "Title" "{Content.Slug}" "about-us" true
|
||||||
autoroute create "Blog" "Title" "{Content.Slug}" "http://website.com/my-blog" true
|
autoroute create "Blog" "Title" "{Content.Slug}" "my-blog" true
|
||||||
autoroute create "BlogPost" "Blog and Title" "{Content.Container.Slug}/{Content.Slug}" "http://website.com/my-blog/a-blog-post" 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."
|
blog create /Title:"Blog" /Homepage:true /Description:"This is your Orchard Blog."
|
||||||
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||||
</Command>
|
</Command>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<Migration features="*" />
|
<Migration features="*" />
|
||||||
|
|
||||||
<Command>
|
<Command>
|
||||||
autoroute create "Page" "Title" "{Content.Slug}" "http://website.com/about-us" true
|
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!"
|
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
|
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||||
</Command>
|
</Command>
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
widget create HtmlWidget /Title:"Second Leader Aside" /Zone:"TripelSecond" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget2" /UseLoremIpsumText:true
|
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
|
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
|
||||||
site setting set baseurl
|
site setting set baseurl
|
||||||
autoroute create "Page" "Title" "{Content.Slug}" "http://website.com/about-us" true
|
autoroute create "Page" "Title" "{Content.Slug}" "about-us" true
|
||||||
autoroute create "Blog" "Title" "{Content.Slug}" "http://website.com/my-blog" true
|
autoroute create "Blog" "Title" "{Content.Slug}" "my-blog" true
|
||||||
autoroute create "BlogPost" "Blog and Title" "{Content.Container.Slug}/{Content.Slug}" "http://website.com/my-blog/a-blog-post" 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
|
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
|
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||||
theme activate "The Theme Machine"
|
theme activate "The Theme Machine"
|
||||||
|
|||||||
@@ -688,7 +688,7 @@ button, .button, a.button {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font: 12px Arial,Helvetica,sans-serif;
|
font: 12px Arial,Helvetica,sans-serif;
|
||||||
padding: 4px 14px 4px 14px;
|
padding: 5px 14px 5px 14px;
|
||||||
|
|
||||||
/*position: relative;*/
|
/*position: relative;*/
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
|
||||||
@@ -20,7 +22,7 @@ namespace Orchard.Utility.Extensions {
|
|||||||
return newDictionary;
|
return newDictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool Compare(this RouteValueDictionary x, RouteValueDictionary y) {
|
public static bool Match(this RouteValueDictionary x, RouteValueDictionary y) {
|
||||||
if(x == y) {
|
if(x == y) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -36,5 +38,21 @@ namespace Orchard.Utility.Extensions {
|
|||||||
// keys can be different in case
|
// keys can be different in case
|
||||||
return x.Keys.All(key => x[key].ToString().Equals(y[key].ToString(), StringComparison.OrdinalIgnoreCase));
|
return x.Keys.All(key => x[key].ToString().Equals(y[key].ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static RouteValueDictionary ToRouteValueDictionary(this IEnumerable<KeyValuePair<string, string>> routeValues) {
|
||||||
|
if (routeValues == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var result = new RouteValueDictionary();
|
||||||
|
foreach (var routeValue in routeValues) {
|
||||||
|
if (routeValue.Key.EndsWith("-")) {
|
||||||
|
result.Add(routeValue.Key.Substring(0, routeValue.Key.Length - 1), routeValue.Value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result.Add(routeValue.Key, routeValue.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user