diff --git a/build/templates/UmbracoProject/.template.config/dotnetcli.host.json b/build/templates/UmbracoProject/.template.config/dotnetcli.host.json index fb990c8902..d0548110fd 100644 --- a/build/templates/UmbracoProject/.template.config/dotnetcli.host.json +++ b/build/templates/UmbracoProject/.template.config/dotnetcli.host.json @@ -28,6 +28,10 @@ "ConnectionString":{ "longName": "connection-string", "shortName": "" + }, + "NoNodesViewPath":{ + "longName": "no-nodes-view-path", + "shortName": "" } }, "usageExamples": [ diff --git a/build/templates/UmbracoProject/.template.config/ide.host.json b/build/templates/UmbracoProject/.template.config/ide.host.json index af5ff5e24c..8b8d2608cd 100644 --- a/build/templates/UmbracoProject/.template.config/ide.host.json +++ b/build/templates/UmbracoProject/.template.config/ide.host.json @@ -55,6 +55,13 @@ "text": "Optional: Database connection string when using Unattended install" }, "isVisible": "true" + }, + { + "id": "NoNodesViewPath", + "name": { + "text": "Optional: Path to a custom view presented with the Umbraco installation contains no published content" + }, + "isVisible": "true" } ] } diff --git a/build/templates/UmbracoProject/.template.config/template.json b/build/templates/UmbracoProject/.template.config/template.json index 8414c5eeb3..1512ce597b 100644 --- a/build/templates/UmbracoProject/.template.config/template.json +++ b/build/templates/UmbracoProject/.template.config/template.json @@ -249,6 +249,43 @@ ] } }, + "NoNodesViewPath":{ + "type": "parameter", + "datatype":"text", + "description": "Path to a custom view presented with the Umbraco installation contains no published content", + "defaultValue": "" + }, + "NoNodesViewPathReplaced":{ + "type": "generated", + "generator": "regex", + "dataType": "string", + "replaces": "NO_NODES_VIEW_PATH_FROM_TEMPLATE", + "parameters": { + "source": "NoNodesViewPath", + "steps": [ + { + "regex": "\\\\", + "replacement": "\\\\" + }, + { + "regex": "\\\"", + "replacement": "\\\"" + }, + { + "regex": "\\\n", + "replacement": "\\\n" + }, + { + "regex": "\\\t", + "replacement": "\\\t" + } + ] + } + }, + "HasNoNodesViewPath":{ + "type": "computed", + "value": "(NoNodesViewPath != \"\")" + }, "UsingUnattenedInstall":{ "type": "computed", "value": "(FriendlyName != \"\" && Email != \"\" && Password != \"\" && ConnectionString != \"\")" diff --git a/build/templates/UmbracoProject/appsettings.json b/build/templates/UmbracoProject/appsettings.json index 4045341729..915671ce4b 100644 --- a/build/templates/UmbracoProject/appsettings.json +++ b/build/templates/UmbracoProject/appsettings.json @@ -15,6 +15,11 @@ }, "Umbraco": { "CMS": { + //#if (HasNoNodesViewPath) + "Global": { + "NoNodesViewPath": "NO_NODES_VIEW_PATH_FROM_TEMPLATE" + }, + //#endif "Hosting": { "Debug": false }