mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 18:27:55 +08:00
Fixing the routable part editor container path for new items w/out a container (rememoved extra "/")
--HG-- branch : dev
This commit is contained in:
@@ -60,7 +60,10 @@ namespace Orchard.Core.Routable.Drivers {
|
|||||||
model.DisplayLeadingPath = path.Substring(0, path.Length - part.Slug.Length);
|
model.DisplayLeadingPath = path.Substring(0, path.Length - part.Slug.Length);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
model.DisplayLeadingPath = GetContainerSlug(part) + "/";
|
var containerSlug = GetContainerSlug(part);
|
||||||
|
model.DisplayLeadingPath = !string.IsNullOrWhiteSpace(containerSlug)
|
||||||
|
? string.Format("{0}/", containerSlug)
|
||||||
|
: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return ContentPartTemplate(model, TemplateName, Prefix).Location("primary", "before.5");
|
return ContentPartTemplate(model, TemplateName, Prefix).Location("primary", "before.5");
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Routable.ViewModels.RoutableEditorViewModel>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Routable.ViewModels.RoutableEditorViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Utility.Extensions"%>
|
<%@ Import Namespace="Orchard.Utility.Extensions"%>
|
||||||
<%@ Import Namespace="Orchard.ContentManagement.Extenstions"%>
|
|
||||||
|
|
||||||
<% Html.RegisterFootScript("jquery.slugify.js"); %>
|
<% Html.RegisterFootScript("jquery.slugify.js"); %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
Reference in New Issue
Block a user