mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
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:
@@ -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"},
|
||||
|
@@ -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}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user