mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Work on Migrations.
Fixing view counter to check for pattern instead of pattern name since it can be empty.
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Orchard.Autoroute.Settings {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Adding null Patterns for the ability to add another Pattern in the UI
|
//Adding Patterns for the UI
|
||||||
List<RoutePattern> newPatterns = new List<RoutePattern>();
|
List<RoutePattern> newPatterns = new List<RoutePattern>();
|
||||||
int current = 0;
|
int current = 0;
|
||||||
foreach (string culture in settings.SiteCultures) {
|
foreach (string culture in settings.SiteCultures) {
|
||||||
@@ -58,10 +58,24 @@ namespace Orchard.Autoroute.Settings {
|
|||||||
}
|
}
|
||||||
current++;
|
current++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//We add a pattern for each culture if there is none
|
||||||
|
if (!settings.Patterns.Where(x => x.Culture == culture).Any()) {
|
||||||
|
//We add the default pattern from migrations
|
||||||
|
if (settings.Patterns.Where(x => x.Culture == "").Any()) {
|
||||||
|
//we add the RoutePattern and we set the culture since there is none defined
|
||||||
|
RoutePattern migrationRoutePattern = settings.Patterns.Where(x => x.Culture == "").First();
|
||||||
|
newPatterns.Add(new RoutePattern { Culture = culture, Name = migrationRoutePattern.Name, Description = migrationRoutePattern.Description, Pattern = migrationRoutePattern.Pattern });
|
||||||
|
} else {
|
||||||
|
//we add the default pattern for custom content types or modules that don't define it in their migration
|
||||||
|
newPatterns.Add(new RoutePattern { Culture = culture, Name = "Title", Description = "my-title", Pattern = "{Content.Slug}" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//we add a new empty line for each culture
|
//we add a new empty line for each culture
|
||||||
newPatterns.Add(new RoutePattern { Culture = culture, Name = null, Description = null, Pattern = null });
|
newPatterns.Add(new RoutePattern { Culture = culture, Name = null, Description = null, Pattern = null });
|
||||||
|
|
||||||
// if the content type has no defaultPattern for autoroute, then use a default one
|
// if the content type has no defaultPattern for autoroute, then assign a the first one we just created
|
||||||
if (!settings.DefaultPatterns.Any(x => x.Culture == culture)) {
|
if (!settings.DefaultPatterns.Any(x => x.Culture == culture)) {
|
||||||
settings.DefaultPatterns.Add(new DefaultPattern { PatternIndex = "0", Culture = culture });
|
settings.DefaultPatterns.Add(new DefaultPattern { PatternIndex = "0", Culture = culture });
|
||||||
}
|
}
|
||||||
@@ -84,6 +98,7 @@ namespace Orchard.Autoroute.Settings {
|
|||||||
settings.SiteCultures = _cultureManager.ListCultures().ToList();
|
settings.SiteCultures = _cultureManager.ListCultures().ToList();
|
||||||
|
|
||||||
if (updateModel.TryUpdateModel(settings, "AutorouteSettings", null, null)) {
|
if (updateModel.TryUpdateModel(settings, "AutorouteSettings", null, null)) {
|
||||||
|
//TODO need to add validations client and/or server side here
|
||||||
// remove empty patterns
|
// remove empty patterns
|
||||||
var patterns = settings.Patterns;
|
var patterns = settings.Patterns;
|
||||||
patterns.RemoveAll(p => String.IsNullOrWhiteSpace(p.Name) && String.IsNullOrWhiteSpace(p.Pattern) && String.IsNullOrWhiteSpace(p.Description));
|
patterns.RemoveAll(p => String.IsNullOrWhiteSpace(p.Name) && String.IsNullOrWhiteSpace(p.Pattern) && String.IsNullOrWhiteSpace(p.Description));
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<td>@Html.TextBoxFor(m => m.Patterns[patternCount].Description, new { @class = "text" })</td>
|
<td>@Html.TextBoxFor(m => m.Patterns[patternCount].Description, new { @class = "text" })</td>
|
||||||
<td>@Html.HiddenFor(m => m.Patterns[patternCount].Culture) </td>
|
<td>@Html.HiddenFor(m => m.Patterns[patternCount].Culture) </td>
|
||||||
</tr>
|
</tr>
|
||||||
if (Model.Patterns[patternCount].Name != null) { patternCultureCount++; } else { patternCultureCount = 0; }
|
if (Model.Patterns[patternCount].Pattern != null) { patternCultureCount++; } else { patternCultureCount = 0; }
|
||||||
patternCount++;
|
patternCount++;
|
||||||
}
|
}
|
||||||
<tr></tr>
|
<tr></tr>
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ namespace Orchard.Blogs {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-blog\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-blog\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
.WithPart("MenuPart")
|
.WithPart("MenuPart")
|
||||||
.WithPart("AdminMenuPart", p => p.WithSetting("AdminMenuPartTypeSettings.DefaultPosition", "2"))
|
.WithPart("AdminMenuPart", p => p.WithSetting("AdminMenuPartTypeSettings.DefaultPosition", "2"))
|
||||||
);
|
);
|
||||||
@@ -58,8 +58,8 @@ namespace Orchard.Blogs {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Blog and Title\",\"Pattern\":\"{Content.Container.Path}/{Content.Slug}\",\"Description\":\"my-blog/my-post\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Blog and Title\",\"Pattern\":\"{Content.Container.Path}/{Content.Slug}\",\"Description\":\"my-blog/my-post\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
.WithPart("BodyPart")
|
.WithPart("BodyPart")
|
||||||
.Draftable()
|
.Draftable()
|
||||||
);
|
);
|
||||||
@@ -133,23 +133,5 @@ namespace Orchard.Blogs {
|
|||||||
|
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom6() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("Blog",
|
|
||||||
cfg => cfg
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-blog\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("BlogPost",
|
|
||||||
cfg => cfg
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Blog and Title\",\"Pattern\":\"{Content.Container.Path}/{Content.Slug}\",\"Description\":\"my-blog/my-post\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return 7;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,8 +12,8 @@ namespace Orchard.CustomForms {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
.WithPart("MenuPart")
|
.WithPart("MenuPart")
|
||||||
.WithPart("CustomFormPart")
|
.WithPart("CustomFormPart")
|
||||||
.DisplayedAs("Custom Form")
|
.DisplayedAs("Custom Form")
|
||||||
@@ -59,17 +59,6 @@ namespace Orchard.CustomForms {
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom4() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("CustomForm",
|
|
||||||
cfg => cfg
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Uninstall() {
|
public void Uninstall() {
|
||||||
ContentDefinitionManager.DeleteTypeDefinition("CustomForm");
|
ContentDefinitionManager.DeleteTypeDefinition("CustomForm");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ namespace Orchard.DynamicForms {
|
|||||||
public int UpdateFrom1() {
|
public int UpdateFrom1() {
|
||||||
ContentDefinitionManager.AlterTypeDefinition("Form", type => type
|
ContentDefinitionManager.AlterTypeDefinition("Form", type => type
|
||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\",\"Culture\":\"en-US\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
);
|
);
|
||||||
|
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ namespace Orchard.Lists {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-list\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-list\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0")));
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]")));
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,15 +35,5 @@ namespace Orchard.Lists {
|
|||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom4() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("List", type => type
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-list\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return 5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ namespace Orchard.Pages {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-page\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-page\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
.WithPart("LayoutPart")
|
.WithPart("LayoutPart")
|
||||||
.Creatable()
|
.Creatable()
|
||||||
.Listable()
|
.Listable()
|
||||||
@@ -28,16 +28,5 @@ namespace Orchard.Pages {
|
|||||||
ContentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.WithPart("CommonPart", p => p.WithSetting("DateEditorSettings.ShowDateEditor", "True")));
|
ContentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.WithPart("CommonPart", p => p.WithSetting("DateEditorSettings.ShowDateEditor", "True")));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom2() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("Page",
|
|
||||||
cfg => cfg
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-page\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,8 +190,8 @@ namespace Orchard.Projections {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-projections\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-projections\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
.WithPart("MenuPart")
|
.WithPart("MenuPart")
|
||||||
.WithPart("ProjectionPart")
|
.WithPart("ProjectionPart")
|
||||||
.WithPart("AdminMenuPart", p => p.WithSetting("AdminMenuPartTypeSettings.DefaultPosition", "5"))
|
.WithPart("AdminMenuPart", p => p.WithSetting("AdminMenuPartTypeSettings.DefaultPosition", "5"))
|
||||||
@@ -274,16 +274,5 @@ namespace Orchard.Projections {
|
|||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom3() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("ProjectionPage",
|
|
||||||
cfg => cfg
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-projections\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,8 +36,8 @@ namespace Orchard.Taxonomies {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-taxonomy\"}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-taxonomy\",\"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
);
|
);
|
||||||
|
|
||||||
SchemaBuilder.CreateTable("TermsPartRecord", table => table
|
SchemaBuilder.CreateTable("TermsPartRecord", table => table
|
||||||
@@ -78,15 +78,5 @@ namespace Orchard.Taxonomies {
|
|||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom4() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("Taxonomy", cfg => cfg
|
|
||||||
.WithPart("AutoroutePart", builder => builder
|
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-taxonomy\",\"Culture\":\"en-US\"}]")
|
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"en-US\"}]"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return 5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,8 +105,8 @@ namespace Orchard.Taxonomies.Services {
|
|||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Taxonomy and Title', Pattern: '{Content.Container.Path}/{Content.Slug}', Description: 'my-taxonomy/my-term/sub-term'}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Taxonomy and Title', Pattern: '{Content.Container.Path}/{Content.Slug}', Description: 'my-taxonomy/my-term/sub-term', \"Culture\":\"\"}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternDefinitions", "[{\"PatternIndex\":\"0\",\"Culture\":\"\"}]"))
|
||||||
.WithPart("CommonPart")
|
.WithPart("CommonPart")
|
||||||
.DisplayedAs(taxonomy.Name + " Term")
|
.DisplayedAs(taxonomy.Name + " Term")
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user