Skip to content

Commit

Permalink
Fix for #567
Browse files Browse the repository at this point in the history
  • Loading branch information
tarjeieo committed Dec 30, 2021
1 parent eff5876 commit b200de0
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Install/Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -329,20 +329,24 @@ if (-not $SkipTemplate.IsPresent) {
Apply-PnPProvisioningTemplate "$BasePath\Taxonomy.pnp" -ErrorAction Stop
Write-Host "[SUCCESS] Successfully applied PnP template [Taxonomy] to [$Url]" -ForegroundColor Green
}

Write-Host "[INFO] Applying PnP template [Portfolio] to [$Url]"
$Instance = Read-PnPProvisioningTemplate "$BasePath\Portfolio.pnp"
$Instance.SupportedUILanguages[0].LCID = $LanguageId
Apply-PnPProvisioningTemplate -InputInstance $Instance -Handlers SupportedUILanguages
Apply-PnPProvisioningTemplate "$BasePath\Portfolio.pnp" -ExcludeHandlers SupportedUILanguages -ErrorAction Stop
Write-Host "[SUCCESS] Successfully applied PnP template [Portfolio] to [$Url]" -ForegroundColor Green

if ($Upgrade.IsPresent) {
Write-Host "[INFO] Applying PnP template [Portfolio] to [$Url]"
Apply-PnPProvisioningTemplate "$BasePath\Portfolio.pnp" -ExcludeHandlers Navigation -ErrorAction Stop
Write-Host "[SUCCESS] Successfully applied PnP template [Portfolio] to [$Url]" -ForegroundColor Green

Write-Host "[INFO] Applying PnP content template (Handlers:Files) to [$Url]"
Apply-PnPProvisioningTemplate "$BasePath\Portfolio_content.$LanguageCode.pnp" -Handlers Files -ErrorAction Stop
Write-Host "[SUCCESS] Successfully applied PnP content template to [$Url]" -ForegroundColor Green
}
else {
Write-Host "[INFO] Applying PnP template [Portfolio] to [$Url]"
$Instance = Read-PnPProvisioningTemplate "$BasePath\Portfolio.pnp"
$Instance.SupportedUILanguages[0].LCID = $LanguageId
Apply-PnPProvisioningTemplate -InputInstance $Instance -Handlers SupportedUILanguages
Apply-PnPProvisioningTemplate "$BasePath\Portfolio.pnp" -ExcludeHandlers SupportedUILanguages -ErrorAction Stop
Write-Host "[SUCCESS] Successfully applied PnP template [Portfolio] to [$Url]" -ForegroundColor Green

Write-Host "[INFO] Applying PnP content template to [$Url]"
Apply-PnPProvisioningTemplate "$BasePath\Portfolio_content.$LanguageCode.pnp" -ErrorAction Stop
Write-Host "[SUCCESS] Successfully applied PnP content template to [$Url]" -ForegroundColor Green
Expand Down

0 comments on commit b200de0

Please sign in to comment.