Skip to content

Commit ac34a20

Browse files
author
Warren Buckley
authored
Merge pull request #11101 from umbraco/v9/feature/added-no-nodes-view-path-option-to-template
Added option to set NoNodesViewPath in umbraco template.
2 parents 8d58e31 + b8a1356 commit ac34a20

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

build/templates/UmbracoProject/.template.config/dotnetcli.host.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"ConnectionString":{
2929
"longName": "connection-string",
3030
"shortName": ""
31+
},
32+
"NoNodesViewPath":{
33+
"longName": "no-nodes-view-path",
34+
"shortName": ""
3135
}
3236
},
3337
"usageExamples": [

build/templates/UmbracoProject/.template.config/ide.host.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
"text": "Optional: Database connection string when using Unattended install"
5656
},
5757
"isVisible": "true"
58+
},
59+
{
60+
"id": "NoNodesViewPath",
61+
"name": {
62+
"text": "Optional: Path to a custom view presented with the Umbraco installation contains no published content"
63+
},
64+
"isVisible": "true"
5865
}
5966
]
6067
}

build/templates/UmbracoProject/.template.config/template.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,43 @@
249249
]
250250
}
251251
},
252+
"NoNodesViewPath":{
253+
"type": "parameter",
254+
"datatype":"text",
255+
"description": "Path to a custom view presented with the Umbraco installation contains no published content",
256+
"defaultValue": ""
257+
},
258+
"NoNodesViewPathReplaced":{
259+
"type": "generated",
260+
"generator": "regex",
261+
"dataType": "string",
262+
"replaces": "NO_NODES_VIEW_PATH_FROM_TEMPLATE",
263+
"parameters": {
264+
"source": "NoNodesViewPath",
265+
"steps": [
266+
{
267+
"regex": "\\\\",
268+
"replacement": "\\\\"
269+
},
270+
{
271+
"regex": "\\\"",
272+
"replacement": "\\\""
273+
},
274+
{
275+
"regex": "\\\n",
276+
"replacement": "\\\n"
277+
},
278+
{
279+
"regex": "\\\t",
280+
"replacement": "\\\t"
281+
}
282+
]
283+
}
284+
},
285+
"HasNoNodesViewPath":{
286+
"type": "computed",
287+
"value": "(NoNodesViewPath != \"\")"
288+
},
252289
"UsingUnattenedInstall":{
253290
"type": "computed",
254291
"value": "(FriendlyName != \"\" && Email != \"\" && Password != \"\" && ConnectionString != \"\")"

build/templates/UmbracoProject/appsettings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
},
1616
"Umbraco": {
1717
"CMS": {
18+
//#if (HasNoNodesViewPath)
19+
"Global": {
20+
"NoNodesViewPath": "NO_NODES_VIEW_PATH_FROM_TEMPLATE"
21+
},
22+
//#endif
1823
"Hosting": {
1924
"Debug": false
2025
}

0 commit comments

Comments
 (0)