Created
March 5, 2017 16:34
-
-
Save hishaamn/8914f7e4db44596c2ca5cdd0270e5402 to your computer and use it in GitHub Desktop.
Sitecore Powershell Script
This file contains hidden or 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
$templateItem = Get-Item -Path "master:\templates" | |
$props = @{ | |
Parameters = @( | |
@{ Name = "userInput"; Title = "User Input"; Tab = "General" }, | |
@{ Name = "templateItem"; Title = "Start Item"; Root = "/sitecore/Templates/"; Tab = "General" } | |
) | |
Title = "Powershell Demo" | |
OkButtonName = "Proceed" | |
CancelButtonName = "Abort" | |
Width = 600 | |
Height = 700 | |
} | |
$result = Read-Variable @props | |
if ($result -ne "ok") { | |
Exit | |
} | |
$manager = New-Object Namespace.Demo | |
$response = $manager.GetResponse($userInput, $templateItem) | |
Show-ModalDialog -Control "OutputResult" -Parameters @{btn_0="Ok"; te="The response is $response"; cp="Important Questions"} -Height 120 -Width 400 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment