Fixing the setting of route's slug and path in the RoutePartDriver

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-07-28 13:45:10 -07:00
parent 0ee57bdf6e
commit b5b5241335

View File

@@ -75,8 +75,6 @@ namespace Orchard.Core.Routable.Drivers {
updater.TryUpdateModel(model, Prefix, null, null);
part.Title = model.Title;
part.Slug = model.Slug;
// TEMP: path format patterns replaces this logic
part.Path = part.GetPathFromSlug(model.Slug);
if (!_routableService.IsSlugValid(part.Slug)) {
@@ -89,6 +87,9 @@ namespace Orchard.Core.Routable.Drivers {
originalSlug, part.Slug, part.ContentItem.ContentType));
}
// TEMP: path format patterns replaces this logic
part.Path = part.GetPathFromSlug(part.Slug);
if (part.ContentItem.Id != 0 && model.PromoteToHomePage && _routableHomePageProvider != null) {
CurrentSite.HomePage = _routableHomePageProvider.GetSettingValue(part.ContentItem.Id);
}