Cleanup of default template code
Moves it to the ViewHelper instead of inside of contenttypecontroller
This commit is contained in:
@@ -66,7 +66,7 @@ namespace Umbraco.Core.IO
|
||||
return viewContent;
|
||||
}
|
||||
|
||||
internal static string GetDefaultFileContent(string layoutPageAlias = null)
|
||||
internal static string GetDefaultFileContent(string layoutPageAlias = null, string modelClassName = null)
|
||||
{
|
||||
var design = @"@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
|
||||
@{
|
||||
@@ -76,6 +76,10 @@ namespace Umbraco.Core.IO
|
||||
if (layoutPageAlias.IsNullOrWhiteSpace() == false)
|
||||
design = design.Replace("null", string.Format("\"{0}.cshtml\"", layoutPageAlias));
|
||||
|
||||
if (modelClassName.IsNullOrWhiteSpace() == false)
|
||||
design = design.Replace(".UmbracoTemplatePage", string.Format(".UmbracoTemplatePage<{0}>", modelClassName));
|
||||
|
||||
|
||||
return design;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user