# Merge-Layout

The Merge-Layout command takes all the layout information stored in the FinalLayout field and merges into the SharedLayout field. The FinalLayout field is reset after the merge completes.

## Syntax

```powershell
Merge-Layout [-Item] <Item> [-Language <String[]>]

Merge-Layout [-Path] <String> [-Language <String[]>]

Merge-Layout -Id <String> [-Database <String>] [-Language <String[]>]
```

## Detailed Description

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

## Parameters

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

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

### -Item  \<Item>

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

### -Path  \<String>

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

### -Id  \<String>

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

### -Database  \<String>

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | false |
| 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

## Notes

Help Author: Adam Najmanowicz, Michael West

## Examples

### EXAMPLE 1

The following retrieves all pages under home and merges the layout.

```powershell
Get-ChildItem master:\content\Showcase\int\home -Recurse | Merge-Layout
```

## Related Topics

* <https://github.com/SitecorePowerShell/Console/>
* [Add-Rendering](https://doc.sitecorepowershell.com/appendix/presentation/add-rendering)
* [New-Rendering](https://doc.sitecorepowershell.com/appendix/presentation/new-rendering)
* [Set-Rendering](https://doc.sitecorepowershell.com/appendix/presentation/set-rendering)
* [Get-Rendering](https://doc.sitecorepowershell.com/appendix/presentation/get-rendering)
* [Get-LayoutDevice](https://doc.sitecorepowershell.com/appendix/presentation/get-layoutdevice)
* [Remove-Rendering](https://doc.sitecorepowershell.com/appendix/presentation/remove-rendering)
* [Get-Layout](https://doc.sitecorepowershell.com/appendix/presentation/get-layout)
* [Reset-Layout](https://doc.sitecorepowershell.com/appendix/presentation/reset-layout)


---

# Agent Instructions: 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:

```
GET https://doc.sitecorepowershell.com/appendix/presentation/merge-layout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
