mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-08-01 19:06:11 +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:
parent
dbb9b4eb3f
commit
22b4172341
@ -60,7 +60,10 @@ namespace Orchard.Core.Routable.Drivers {
|
||||
model.DisplayLeadingPath = path.Substring(0, path.Length - part.Slug.Length);
|
||||
}
|
||||
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");
|
||||
|
@ -1,6 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Routable.ViewModels.RoutableEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Utility.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.ContentManagement.Extenstions"%>
|
||||
|
||||
<% Html.RegisterFootScript("jquery.slugify.js"); %>
|
||||
<fieldset>
|
||||
|
Loading…
Reference in New Issue
Block a user