Skip to content

Instantly share code, notes, and snippets.

@AlexKasaku
Created September 12, 2016 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexKasaku/ca6e28c40bf11569dbc0ef91a7a4faa7 to your computer and use it in GitHub Desktop.
Save AlexKasaku/ca6e28c40bf11569dbc0ef91a7a4faa7 to your computer and use it in GitHub Desktop.
Find items that have a Rendering that uses a particular parameter
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