mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 01:57:55 +08:00
Improving aliases editor
--HG-- branch : autoroute
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
cac46d72cc61f2c5f3d3d3dde3229f61edc56f8e src/Orchard.Web/Modules/Orchard.Alias
|
||||
bce623c333ca90f0f815843c04c8d124f2c7b6d9 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
d91108343ff1259cd3e35b2c080eb166d024711b src/Orchard.Web/Modules/Orchard.Alias
|
||||
0b87c2916b43a87addfa534470c3bd7a47be662a src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
67bf9897ee9dd9483369aece729ad7c6f042941c src/Orchard.Web/Modules/Orchard.Forms
|
||||
6033664adc404a22f311029b69fbf1e34dc4ff2a src/Orchard.Web/Modules/Orchard.Projections
|
||||
a1ef39ba4e2d0cd78b3c91d6150e841793acb34b src/Orchard.Web/Modules/Orchard.Routable
|
||||
|
@@ -54,9 +54,9 @@
|
||||
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
|
||||
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>
|
||||
|
@@ -26,7 +26,7 @@
|
||||
<Migration features="*" />
|
||||
|
||||
<Command>
|
||||
autoroute create "Page" "Title" "{Content.Slug}" "/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!"
|
||||
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||
</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:"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
|
||||
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"
|
||||
|
@@ -688,7 +688,7 @@ button, .button, a.button {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font: 12px Arial,Helvetica,sans-serif;
|
||||
padding: 4px 14px 4px 14px;
|
||||
padding: 5px 14px 5px 14px;
|
||||
|
||||
/*position: relative;*/
|
||||
text-align: center;
|
||||
|
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.Routing;
|
||||
|
||||
@@ -20,7 +22,7 @@ namespace Orchard.Utility.Extensions {
|
||||
return newDictionary;
|
||||
}
|
||||
|
||||
public static bool Compare(this RouteValueDictionary x, RouteValueDictionary y) {
|
||||
public static bool Match(this RouteValueDictionary x, RouteValueDictionary y) {
|
||||
if(x == y) {
|
||||
return true;
|
||||
}
|
||||
@@ -36,5 +38,21 @@ namespace Orchard.Utility.Extensions {
|
||||
// keys can be different in case
|
||||
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