Merge pull request #11101 from umbraco/v9/feature/added-no-nodes-view-path-option-to-template

Added option to set NoNodesViewPath in umbraco template.
This commit is contained in:
Warren Buckley
2021-09-15 10:49:21 +01:00
committed by GitHub
4 changed files with 53 additions and 0 deletions

View File

@@ -28,6 +28,10 @@
"ConnectionString":{
"longName": "connection-string",
"shortName": ""
},
"NoNodesViewPath":{
"longName": "no-nodes-view-path",
"shortName": ""
}
},
"usageExamples": [

View File

@@ -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"
}
]
}

View File

@@ -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 != \"\")"

View File

@@ -15,6 +15,11 @@
},
"Umbraco": {
"CMS": {
//#if (HasNoNodesViewPath)
"Global": {
"NoNodesViewPath": "NO_NODES_VIEW_PATH_FROM_TEMPLATE"
},
//#endif
"Hosting": {
"Debug": false
}