Updating the BlogPostPartHandler and BlogPartHandler to use blogPath instead of blogSlug in their display RVDs to align with earlier changes to blogs to use their path instead of slug for routing.

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2011-02-03 13:07:09 -08:00
parent 6692244857
commit 4d4c362d31
2 changed files with 4 additions and 4 deletions

View File

@@ -50,15 +50,15 @@ namespace Orchard.Blogs.Handlers {
if (blog == null)
return;
var blogSlug = blog.Id == _routableHomePageProvider.GetHomePageId(_workContextAccessor.GetContext().CurrentSite.HomePage)
var blogPath = blog.Id == _routableHomePageProvider.GetHomePageId(_workContextAccessor.GetContext().CurrentSite.HomePage)
? ""
: blog.As<RoutePart>().Slug;
: blog.As<RoutePart>().Path;
context.Metadata.DisplayRouteValues = new RouteValueDictionary {
{"Area", "Orchard.Blogs"},
{"Controller", "Blog"},
{"Action", "Item"},
{"blogSlug", blogSlug}
{"blogPath", blogPath}
};
context.Metadata.CreateRouteValues = new RouteValueDictionary {
{"Area", "Orchard.Blogs"},

View File

@@ -76,7 +76,7 @@ namespace Orchard.Blogs.Handlers {
{"Controller", "BlogPostAdmin"},
{"Action", "Delete"},
{"postId", context.ContentItem.Id},
{"blogSlug", blogPost.BlogPart.As<RoutePart>().Slug}
{"blogPath", blogPost.BlogPart.As<RoutePart>().Path}
};
}
}