Rendering manipulation in PowerShell for Sitecore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$item = get-item master:\content\Demo\Int\Home | |
$device =Get-Device -Default | |
$contentDataSource = get-item master:\content\Demo\Int\Home\about-us\employee-stories\adam-najmanowicz | |
$ImageDataSource = get-item master:\content\Demo\Int\Data\Images\d56cf7e777a2496aa6489a7bffc03539 | |
$rendering = get-item master:\layout\Sublayouts\ZenGarden\Basic\Content | |
Add-Rendering -Item $item -Device $device -Rendering $rendering -Placeholder main -Parameter @{FieldName ="Title"} -DataSource $contentDataSource | |
$rendering = get-item master:\layout\Sublayouts\ZenGarden\Basic\Image | |
Add-Rendering -Item $item -Device $device -Rendering $rendering -Placeholder main -DataSource $ImageDataSource | |
$rendering = get-item master:\layout\Sublayouts\ZenGarden\Basic\Subtitle | |
Add-Rendering -Item $item -Device $device -Rendering $rendering -Placeholder main -DataSource $contentDataSource | |
$rendering = get-item master:\layout\Sublayouts\ZenGarden\Basic\Title | |
Add-Rendering -Item $item -Device $device -Rendering $rendering -Placeholder main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment