@@ -174,6 +174,7 @@ function Set-PodeWebLoginPage
174
174
Page = @ {
175
175
Name = ' Home'
176
176
Title = ' Home'
177
+ DisplayName = ' Home'
177
178
Path = ' /'
178
179
IsSystem = $true
179
180
}
@@ -203,6 +204,10 @@ function Set-PodeWebHomePage
203
204
[hashtable []]
204
205
$Layouts ,
205
206
207
+ [Parameter ()]
208
+ [string ]
209
+ $DisplayName ,
210
+
206
211
[Parameter ()]
207
212
[string ]
208
213
$Title ,
@@ -229,8 +234,12 @@ function Set-PodeWebHomePage
229
234
}
230
235
231
236
# set page title
237
+ if ([string ]::IsNullOrWhiteSpace($DisplayName )) {
238
+ $DisplayName = ' Home'
239
+ }
240
+
232
241
if ([string ]::IsNullOrWhiteSpace($Title )) {
233
- $Title = ' Home '
242
+ $Title = $DisplayName
234
243
}
235
244
236
245
# route path
@@ -242,7 +251,8 @@ function Set-PodeWebHomePage
242
251
ObjectType = ' Page'
243
252
Path = $routePath
244
253
Name = ' Home'
245
- Title = $Title
254
+ Title = [System.Net.WebUtility ]::HtmlEncode($Title )
255
+ DisplayName = [System.Net.WebUtility ]::HtmlEncode($DisplayName )
246
256
NoTitle = $NoTitle.IsPresent
247
257
Navigation = $Navigation
248
258
Layouts = $Layouts
@@ -317,6 +327,10 @@ function Add-PodeWebPage
317
327
[string ]
318
328
$Name ,
319
329
330
+ [Parameter ()]
331
+ [string ]
332
+ $DisplayName ,
333
+
320
334
[Parameter ()]
321
335
[string ]
322
336
$Title ,
@@ -400,8 +414,12 @@ function Add-PodeWebPage
400
414
}
401
415
402
416
# set page title
417
+ if ([string ]::IsNullOrWhiteSpace($DisplayName )) {
418
+ $DisplayName = $Name
419
+ }
420
+
403
421
if ([string ]::IsNullOrWhiteSpace($Title )) {
404
- $Title = $Name
422
+ $Title = $DisplayName
405
423
}
406
424
407
425
# build the route path
@@ -414,6 +432,7 @@ function Add-PodeWebPage
414
432
Path = $routePath
415
433
Name = $Name
416
434
Title = [System.Net.WebUtility ]::HtmlEncode($Title )
435
+ DisplayName = [System.Net.WebUtility ]::HtmlEncode($DisplayName )
417
436
NoTitle = $NoTitle.IsPresent
418
437
NoBackArrow = $NoBackArrow.IsPresent
419
438
NoBreadcrumb = $NoBreadcrumb.IsPresent
@@ -515,6 +534,7 @@ function Add-PodeWebPage
515
534
Write-PodeWebViewResponse - Path ' index' - Data @ {
516
535
Page = $global :PageData
517
536
Title = $global :PageData.Title
537
+ DisplayName = $global :PageData.DisplayName
518
538
Theme = $theme
519
539
Navigation = $navigation
520
540
Breadcrumb = $breadcrumb
@@ -579,7 +599,7 @@ function Add-PodeWebPageLink
579
599
580
600
[Parameter ()]
581
601
[string ]
582
- $Title ,
602
+ $DisplayName ,
583
603
584
604
[Parameter ()]
585
605
[string ]
@@ -633,16 +653,16 @@ function Add-PodeWebPageLink
633
653
}
634
654
635
655
# set page title
636
- if ([string ]::IsNullOrWhiteSpace($Title )) {
637
- $Title = $Name
656
+ if ([string ]::IsNullOrWhiteSpace($DisplayName )) {
657
+ $DisplayName = $Name
638
658
}
639
659
640
660
# setup page meta
641
661
$pageMeta = @ {
642
662
ComponentType = ' Page'
643
663
ObjectType = ' Link'
644
664
Name = $Name
645
- Title = [System.Net.WebUtility ]::HtmlEncode($Title )
665
+ DisplayName = [System.Net.WebUtility ]::HtmlEncode($DisplayName )
646
666
NewTab = $NewTab.IsPresent
647
667
Icon = $Icon
648
668
Group = $Group
0 commit comments