Skip to main content
edited body
Source Link
Michael West
  • 18.6k
  • 2
  • 42
  • 105

Navigating in Content Editor is not really what Sitecore Powershell Extension is built for. But it's possible to run javascript from PSESPE that will do the redirect for you:

$id = $deletedItem.Parent.ID.ToString()
$script = ('window.top.location = "/sitecore/shell/Applications/Content%20Editor?fo=' + $id +'"')
Invoke-JavaScript -Script $script

Be aware that if you add this at the end of your PSESPE script, it will not show message saying that script execution is completed and will redirect immediately to the parent item.

Navigating in Content Editor is not really what Sitecore Powershell Extension is built for. But it's possible to run javascript from PSE that will do the redirect for you:

$id = $deletedItem.Parent.ID.ToString()
$script = ('window.top.location = "/sitecore/shell/Applications/Content%20Editor?fo=' + $id +'"')
Invoke-JavaScript -Script $script

Be aware that if you add this at the end of your PSE script, it will not show message saying that script execution is completed and will redirect immediately to the parent item.

Navigating in Content Editor is not really what Sitecore Powershell Extension is built for. But it's possible to run javascript from SPE that will do the redirect for you:

$id = $deletedItem.Parent.ID.ToString()
$script = ('window.top.location = "/sitecore/shell/Applications/Content%20Editor?fo=' + $id +'"')
Invoke-JavaScript -Script $script

Be aware that if you add this at the end of your SPE script, it will not show message saying that script execution is completed and will redirect immediately to the parent item.

Source Link
Marek Musielak
  • 24.2k
  • 3
  • 31
  • 64

Navigating in Content Editor is not really what Sitecore Powershell Extension is built for. But it's possible to run javascript from PSE that will do the redirect for you:

$id = $deletedItem.Parent.ID.ToString()
$script = ('window.top.location = "/sitecore/shell/Applications/Content%20Editor?fo=' + $id +'"')
Invoke-JavaScript -Script $script

Be aware that if you add this at the end of your PSE script, it will not show message saying that script execution is completed and will redirect immediately to the parent item.