Fixing the routable part editor container path for new items w/out a container (rememoved extra "/")

--HG--
branch : dev
This commit is contained in:
Nathan Heskew 2010-07-15 09:50:39 -07:00
parent dbb9b4eb3f
commit 22b4172341
2 changed files with 4 additions and 2 deletions

View File

@ -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");

View File

@ -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>