Updates rendering with new values.
Set-Rendering [-Item] <Item> -Instance <RenderingDefinition> [-Parameter <Hashtable>] [-PlaceHolder <String>] [-DataSource <String>] [-Index <Int32>] [-FinalLayout] [-Device <DeviceItem>] [-Language <String[]>]
Set-Rendering [-Path] <String> -Instance <RenderingDefinition> [-Parameter <Hashtable>] [-PlaceHolder <String>] [-DataSource <String>] [-Index <Int32>] [-FinalLayout] [-Device <DeviceItem>] [-Language <String[]>]
Set-Rendering -Id <String> [-Database <String>] -Instance <RenderingDefinition> [-Parameter <Hashtable>] [-PlaceHolder <String>] [-DataSource <String>] [-Index <Int32>] [-FinalLayout] [-Device <DeviceItem>] [-Language <String[]>]
Updates rendering instance with new values. The instance should be earlier obtained using Get-Rendering.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Instance of the Rendering to be updated.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Rendering Parameters to be overriden on the Rendering that is being updated - if not specified the value provided in rendering definition specified in the Instance parameter will be used.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Placeholder path the Rendering should be added to - if not specified the value provided in rendering definition specified in the Instance parameter will be used.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Data source of the Rendering - if not specified the value provided in rendering definition specified in the Instance parameter will be used.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
If provided the rendering will be moved to the specified index.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Targets the Final Layout. If not provided, the Shared Layout will be targeted. Applies to Sitecore 8.0 and higher only.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Specifies the target device when applying the rendering changes.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
The item to be processed.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | true (ByValue, ByPropertyName) |
Accept Wildcard Characters? | false |
Path to the item to be processed - can work with Language parameter to narrow the publication scope.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Id of the item to be processed - can work with Language parameter to narrow the publication scope.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Database containing the item to be processed - can work with Language parameter to narrow the publication scope.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
The input type is the type of the objects that you can pipe to the cmdlet.
- Sitecore.Data.Items.Item
Help Author: Adam Najmanowicz, Michael West
Change all rendering's placeholder from main to footer.
$item = Get-Item -Path master:\content\home
Get-Rendering -Item $item -PlaceHolder "main" |
Foreach-Object {
$_.Placeholder = "footer";
Set-Rendering -Item $item -Instance $_
}
Clear the datasource value for a rendering.
$item = Get-Item -Path master:\content\home
Get-Rendering -Item $item -PlaceHolder "main" |
Foreach-Object {
$_.DataSource = $null
Set-Rendering -Item $item -Instance $_
}