Skip to content

Instantly share code, notes, and snippets.

@ankitjoshi
Created May 29, 2021 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitjoshi/2e5412571b0bc0c848e35f0aeea3f52c to your computer and use it in GitHub Desktop.
Save ankitjoshi/2e5412571b0bc0c848e35f0aeea3f52c to your computer and use it in GitHub Desktop.
Search Dictionary domain item script (SXA Add Dictionary Script #3)
function Test-ItemIsDictionaryDomain {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, ValueFromPipeline = $true, Position=0 )]
[Item]$Item
)
begin {
Write-Verbose "Cmdlet Test-ItemIsDictionaryDomain - Begin"
}
process {
Write-Verbose "Cmdlet Test-ItemIsDictionaryDomain - Process"
# dictionary domain template Id...
[Sitecore.Data.ID]$DataSourceConfigurationsTemplateID = "{0A2847E6-9885-450B-B61E-F9E6528480EF}"
[Sitecore.Data.Managers.TemplateManager]::GetTemplate($Item).InheritsFrom($DataSourceConfigurationsTemplateID)
}
end {
Write-Verbose "Cmdlet Test-ItemIsDictionaryDomain - End"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment