Created
September 12, 2016 11:57
-
-
Save AlexKasaku/ca6e28c40bf11569dbc0ef91a7a4faa7 to your computer and use it in GitHub Desktop.
Find items that have a Rendering that uses a particular parameter
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
foreach ( $item in Get-ChildItem -Path master:/sitecore/content/Home -WithParent -Recurse ) | |
{ | |
$params = @{ "paramName" = "*" } | |
$renderings = Get-Rendering -Item $item -Parameter $params | |
if ($renderings.Count -gt 0) | |
{ | |
# This item has a rendering with the parameter | |
$item.FullPath | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment