Get-PlaceholderSetting

The Get-PlaceholderSetting command returns PlaceholderSettingDefinition(s) for an item using the filtering parameters.

Syntax

Get-PlaceholderSetting -Item <Item> [-Key <string>] [-PlaceholderSetting <Item>] [-Index <int>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -Item <Item> -Instance <PlaceholderDefinition> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -Item <Item> -UniqueId <string> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -Path <string> [-Key <string>] [-PlaceholderSetting <Item>] [-Index <int>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -Path <string> -Instance <PlaceholderDefinition> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -Path <string> -UniqueId <string> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting [-Id <string>] [-Database <string>] [-Key <string>] [-PlaceholderSetting <Item>] [-Index <int>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -Instance <PlaceholderDefinition> [-Id <string>] [-Database <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Get-PlaceholderSetting -UniqueId <string> [-Id <string>] [-Database <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Detailed Description

The Get-PlaceholderSetting command returns PlaceholderSettingDefinition(s) for an item using the filtering parameters.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-Database <string>

Database containing the item to be processed - can work with Language parameter to narrow the publication scope.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Device <DeviceItem>

Device for which the placeholder settings will be retrieved.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FinalLayout <switch>

Targets the Final Layout. If not provided, the Shared Layout will be targeted. Applies to Sitecore 8.0 and higher only.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id <string>

Id of the item to be processed - can work with Language parameter to narrow the publication scope.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Index <int>

Index at which the placeholder setting exists in the layout. The placeholder setting at that index will be returned.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Instance <PlaceholderDefinition>

Specific instance of placeholder setting that should be returned. The instance could earlier be obtained through e.g. use of Get-PlaceholderSetting.

AliasesNone

Required?

true

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Item <Item>

The item to be processed.

AliasesNone

Required?

true

Position?

Named

Default Value

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Key <string>

Placeholder key filter - supports wildcards.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

-Language <string[]>

Language that will be used as source language. If not specified the current user language will be used. Globbing/wildcard supported.

AliasesLanguages

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path <string>

Path to the item to be processed - can work with Language parameter to narrow the publication scope.

AliasesFullName, FileName

Required?

true

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PlaceholderSetting <Item>

Item representing the placeholder setting. If matching, the placeholder setting will be returned.

AliasesNone

Required?

false

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UniqueId <string>

UniqueID of the placeholder setting to be retrieved.

AliasesNone

Required?

true

Position?

Named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Sitecore.Data.Items.Item

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Sitecore.Layouts.PlaceholderDefinition

Notes

Help Author: Adam Najmanowicz, Michael West, Alex Washtell

Examples

EXAMPLE 1

Get all placeholder settings for "Default" device, using any key matching the wildcard "content*"

Get-Item master:\content\home | Get-PlaceholderSetting -Key "content*" -Device (Get-LayoutDevice "Default") 

Last updated