Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get Styles inventory from a given SXA website
$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