Skip to content

Instantly share code, notes, and snippets.

@nehemiahj
Last active September 7, 2023 02:57
Show Gist options
  • Save nehemiahj/64db63a8602b27cf4cd17a4e0f3def63 to your computer and use it in GitHub Desktop.
Save nehemiahj/64db63a8602b27cf4cd17a4e0f3def63 to your computer and use it in GitHub Desktop.
To enable content authors to open XM Cloud Pages from Content Editor
Import-Function Get-SiteItem
$item = Get-Item .
$site = Get-SiteItem $item
$title = "Tools"
$text = "To edit in Pages, please click <a href='https://pages.sitecorecloud.io/composer/pages/editor?sc_itemid=$($item.ID)&sc_lang=$($item.Language.Name)&sc_version=$($item.Version.Number)&sc_site=$($site.Name)' target='_blank'>here</a>"
$pipelineArgs.Add($title, $text);
$warning = $pipelineArgs.Warnings[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment