Exemplo n.º 1
0
 private static void RewritePerson(Umbraco.Core.Models.IContent entity, IContentService contentService)
 {
     string characterName = entity.GetValue<string>("characterName");
     string newAlias = ParseUrl(InceptionConstants.English + "/" + characterName) + "," + ParseUrl(InceptionConstants.Dutch + "/" + characterName);
     //the additional if is because of this: http://issues.umbraco.org/issue/U4-4147
     if(newAlias != entity.GetUmbracoUrlAlias())
     {
         entity.SetUmbracoUrlAlias(newAlias);
         contentService.SaveAndPublishWithStatus(entity, 0, false);
     }
 }