> For the complete documentation index, see [llms.txt](https://doc.sitecorepowershell.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sitecorepowershell.com/appendix/presentation/add-placeholdersetting.md).

# Add-PlaceholderSetting

Adds a placeholder setting to a chosen device for the presentation of an item.

## Syntax

```powershell
Add-PlaceholderSetting [-Item] <Item> -Instance <PlaceholderDefinition> [-MetaDataItemId <string>] [-Key <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Add-PlaceholderSetting [-Path] <string> -Instance <PlaceholderDefinition> [-MetaDataItemId <string>] [-Key <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>]

Add-PlaceholderSetting -Instance <PlaceholderDefinition> -Id <string> [-MetaDataItemId <string>] [-Key <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-Database <string>]
```

## Detailed Description

Adds a placeholder setting to a chosen device for the presentation of an item.

© 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.

| Aliases                     | None  |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | Named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Device  \<DeviceItem>

Device the placeholder setting is assigned to. If not specified - default device will be used.

| Aliases                     | None  |
| --------------------------- | ----- |
| 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.

| Aliases                     | None  |
| --------------------------- | ----- |
| 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.

| Aliases                     | None  |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | Named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? |       |

### -Instance  \<PlaceholderDefinition>

Placeholder setting definition to be added to the item

| Aliases                     | PlaceholderSetting |
| --------------------------- | ------------------ |
| Required?                   | true               |
| Position?                   | Named              |
| Default Value               |                    |
| Accept Pipeline Input?      | false              |
| Accept Wildcard Characters? | false              |

### -Item  \<Item>

The item to be processed.

| Aliases                     | None                           |
| --------------------------- | ------------------------------ |
| Required?                   | true                           |
| Position?                   | 0                              |
| Default Value               |                                |
| Accept Pipeline Input?      | true (ByValue, ByPropertyName) |
| Accept Wildcard Characters? | false                          |

### -Key  \<string>

The key for this placeholder setting - if not specified the value provided in the placeholder setting definition specified in the Instance parameter will be used.

| Aliases                     | None  |
| --------------------------- | ----- |
| Required?                   | false |
| Position?                   | Named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Language  \<string\[]>

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

| Aliases                     | Languages |
| --------------------------- | --------- |
| Required?                   | false     |
| Position?                   | Named     |
| Default Value               |           |
| Accept Pipeline Input?      | false     |
| Accept Wildcard Characters? | false     |

### -MetaDataItemId  \<string>

The metadata item Id for this placeholder setting - if not specified the value provided in the placeholder setting definition specified in the Instance parameter will be used.

| Aliases                     | None  |
| --------------------------- | ----- |
| 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.

| Aliases                     | FullName, FileName |
| --------------------------- | ------------------ |
| Required?                   | true               |
| Position?                   | 0                  |
| 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.

* System.Void

## Notes

Help Author: Adam Najmanowicz, Michael West, Alex Washtell

## Examples

### EXAMPLE 1

Create item defining placeholder setting and add to an item

```powershell
$placeholderSetting = gi "master:\layout\Placeholder Settings\content" | New-PlaceholderSetting -Key "content"
$item = gi master:\content\Home
# Add the placeholder setting to the item
Add-PlaceholderSetting -Item $item -Instance $placeholderSetting
```

### EXAMPLE 2

Create item defining placeholder setting and add to an item, overriding the key

```powershell
$placeholderSetting = gi "master:\layout\Placeholder Settings\content" | New-PlaceholderSetting -Key "content"
# find item you want the placeholder setting added to
$item = gi master:\content\Home
# Add the placeholder setting to the item
Add-PlaceholderSetting -Item $item -Instance $placeholderSetting -Key "content-override"
```

## Related Topics

* <https://github.com/SitecorePowerShell/Console/><br>
* [Get-PlaceholderSetting](/appendix/presentation/get-placeholdersetting.md)
* [New-PlaceholderSetting](/appendix/presentation/new-placeholdersetting.md)
* [Remove-PlaceholderSetting](/appendix/presentation/remove-placeholdersetting.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.sitecorepowershell.com/appendix/presentation/add-placeholdersetting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
