Skip to content

Instantly share code, notes, and snippets.

@michaellwest
Created October 7, 2018 02:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaellwest/09dc454441142f9ef4e360050af1d6de to your computer and use it in GitHub Desktop.
Save michaellwest/09dc454441142f9ef4e360050af1d6de to your computer and use it in GitHub Desktop.
Displays a dialog using Sitecore PowerShell Extensions.
# Be sure to update this ID to whichever script you want to execute when the link is clicked.
$scriptId = "{6EAF681D-5D87-4C43-B279-356A8B9A15CF}"
$item = Get-Item -Path "."
$script = Get-Item -Path "master:" -ID $scriptId
$command = "item:executescript(id=$($item.ID),db=$($item.Database.Name),script=$($script.ID),scriptDb=$($script.Database.Name))"
$options = [ordered]@{"Download Sample"=$command;"View Documentation"=$command;}
$props = @{
Parameters = @(
@{Name="buttons"; Title="Super Userful Links"; Value = "Something interesting going on here."; Options=$options; Editor="link"; }
)
Title = "Command Dialog Demo"
Icon = "OfficeWhite/32x32/fire.png"
Description = "Provides an example of how to add links to the dialog."
Width = 450
Height = 300
ShowHints = $true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment