This file contains hidden or 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
<# | |
.SYNOPSIS | |
Data Import Wizard provides a way to generate or update content from an external file. | |
.DESCRIPTION | |
The import file uses the properties "Name" and "Id" to help match existing items. | |
.NOTES | |
Requires Sitecore PowerShell Extensions 4.6 or newer. | |
This file contains hidden or 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 |
This file contains hidden or 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
# http://jockstothecore.com/content-import-with-powershell-treasure-hunt | |
function NormalizeName($name) | |
{ | |
# replace all special symbols with single spaces | |
$name = $name -replace "[^a-zA-Z0-9]", " " -replace "\s+", "" | |
return $name.Trim() | |
} |
NewerOlder