mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Contents module redirects to an items AdminRouteValues from metadata after creation. Normally it is just its edit screen, but this allows handlers to customize this per item. Lists for example redirect to the lists contents rather than jump to the list properties screen.
--HG-- branch : dev
This commit is contained in:
@@ -238,7 +238,8 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
||||
? T("Your content has been created.")
|
||||
: T("Your {0} has been created.", contentItem.TypeDefinition.DisplayName));
|
||||
return RedirectToAction("Edit", new RouteValueDictionary { { "Id", contentItem.Id } });
|
||||
var adminRouteValues = _contentManager.GetItemMetadata(contentItem).AdminRouteValues;
|
||||
return RedirectToRoute(adminRouteValues);
|
||||
}
|
||||
|
||||
public ActionResult Edit(int id) {
|
||||
|
||||
Reference in New Issue
Block a user