Updates Content Controller - that uses the Mapping AfterMap to allow us to update the Name of the node based on the culturename passed into the WebAPI
This commit is contained in:
@@ -456,7 +456,8 @@ namespace Umbraco.Web.Editors
|
||||
string orderBy = "SortOrder",
|
||||
Direction orderDirection = Direction.Ascending,
|
||||
bool orderBySystemField = true,
|
||||
string filter = "")
|
||||
string filter = "",
|
||||
string cultureName = "")
|
||||
{
|
||||
long totalChildren;
|
||||
IContent[] children;
|
||||
@@ -493,6 +494,11 @@ namespace Umbraco.Web.Editors
|
||||
Mapper.Map<IContent, ContentItemBasic<ContentPropertyBasic>>(content,
|
||||
opts =>
|
||||
{
|
||||
if(string.IsNullOrEmpty(cultureName) == false)
|
||||
{
|
||||
opts.AfterMap((source, target) => target.Name = source.GetCultureName(cultureName));
|
||||
}
|
||||
|
||||
// if there's a list of property aliases to map - we will make sure to store this in the mapping context.
|
||||
if (String.IsNullOrWhiteSpace(includeProperties) == false)
|
||||
{
|
||||
@@ -500,6 +506,7 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
return pagedResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user