Created
January 5, 2021 12:28
-
-
Save AdamNaj/cc4ee54e29629cf460f7638f29797274 to your computer and use it in GitHub Desktop.
Get Styles inventory from a given SXA website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$siteroot = "master:\content\Sitecore\MVP" | |
gci "$($siteroot)\Presentation\Styles" -Recurse | | |
? { $_.TemplateName -eq "Style" } | | |
select-object @{Name="EE Category / Horizon Controller Name"; Expression={$_.Parent.DisplayName}}, | |
@{Name="Horizon Controller Type"; Expression={$_.Parent.Fields["Type"]}}, | |
@{Name="Style Name"; Expression={$_.DisplayName}}, | |
@{Name="CSS Class"; Expression={$_.Value}}, | |
@{Name="Allowed on Components"; Expression={($_.PSFields."Allowed Renderings".Items | | |
% { Get-Item master:\ -ID $_ } | | |
% { $_.DisplayName }) -join ", " }} | | |
Show-ListView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment