Fixes U4-1512 by using the same safe alias method as in the legacy code base.
This should ensure that published content aliases has the same format as in v4.
This commit is contained in:
@@ -392,8 +392,7 @@ namespace Umbraco.Core.Models
|
||||
public static XElement ToXml(this IContent content)
|
||||
{
|
||||
//nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias);
|
||||
//var nodeName = content.ContentType.Alias.ToUmbracoAlias(StringAliasCaseType.CamelCase, true);
|
||||
var nodeName = content.ContentType.Alias;
|
||||
var nodeName = UmbracoSettings.UseLegacyXmlSchema ? "node" : content.ContentType.Alias.ToSafeAliasWithForcingCheck();
|
||||
var niceUrl = content.Name.FormatUrl().ToLower();
|
||||
|
||||
var xml = new XElement(nodeName,
|
||||
@@ -412,7 +411,8 @@ namespace Umbraco.Core.Models
|
||||
new XAttribute("writerName", content.GetWriterProfile().Name),
|
||||
new XAttribute("creatorName", content.GetCreatorProfile().Name),
|
||||
new XAttribute("path", content.Path),
|
||||
new XAttribute("isDoc", ""));
|
||||
new XAttribute("isDoc", ""),
|
||||
UmbracoSettings.UseLegacyXmlSchema ? new XAttribute("nodeTypeAlias", content.ContentType.Alias) : null);
|
||||
|
||||
foreach (var property in content.Properties)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user