Skip to content

Registry Editor and Report #1375

@michaellwest

Description

@michaellwest

Would be nice to have a registry editor like here:
https://www.skillcore.net/sitecore/sitecore-registry-editor

Here is a dialog that might be helpful in the editor:

$previouslySelectedKey = "previously.selected.databases"; #you should change this to something that makes sense to you
$previouslySelectedString = [Sitecore.Web.UI.HtmlControls.Registry]::GetString($previouslySelectedKey); 
$previouslySelected = $previouslySelectedString.Split(",");
$targets = [ordered]@{"Web"="web"; "Preview"="webpreview"};

$props = @{
    Parameters = @( @{ Name="selectedTargets"; Title="Choose Targets"; Editor="checklist"; Options=$targets; Value=$previouslySelected; Tooltip = "Select one or more targets" } )
    Title = "Publish Item and Local Data"
    Description = "Select the relevant publishing settings for the item."
    Width = 500
    Height = 500
    ShowHints = $true
}

$result = Read-Variable @props

if (($result -eq 'cancel') -or (-not $selectedTargets)) {
    Write-Host "No target was selected." -ForegroundColor Yellow
    return
}

$previouslySelectedString = [string]::Join(",", $selectedTargets)
[Sitecore.Web.UI.HtmlControls.Registry]::SetString($previouslySelectedKey, $previouslySelectedString) #persist for use in the next instance of this dialog
Write-Host "target was selected." -ForegroundColor Green

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions