Skip to content

Instantly share code, notes, and snippets.

@AdamNaj
Created July 27, 2015 09:12
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 AdamNaj/98ab5dff941a93fc26f0 to your computer and use it in GitHub Desktop.
Save AdamNaj/98ab5dff941a93fc26f0 to your computer and use it in GitHub Desktop.
Rich Reports
#Show-ListView - with rich renderers
Import-Function Render-ReportField
$script = Get-Item "master:\system\Modules\PowerShell\Script Library\Authorable Reports\Functions\Show-SearchResultDetails"
$index="sitecore_master_index"
Get-ChildItem master:\ | Show-ListView -Property `
ProviderPath, @{Label="Display Name"; Expression={ $_.DisplayName }},
HasChildren, TemplateName,
@{Label="Random Percent Test"; Expression={ Render-PercentValue (Get-Random -minimum 1 -maximum 100) }},
@{Label="Thumbnail"; Expression={ Render-ItemField $_ __thumbnail }},
@{Label="Index Fields"; Expression={ Render-ScriptInvoker $script @{index=$index; itemId="$($_.Uri)"} "Show Index Fields" } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment