Skip to content

Instantly share code, notes, and snippets.

View patelcp's full-sized avatar

Chirag Patel patelcp

View GitHub Profile
@patelcp
patelcp / ImportWizardFromCSV.ps1
Created December 29, 2017 21:13 — forked from michaellwest/ImportWizardFromCSV.ps1
Import content from a CSV using Sitecore PowerShell Extensions.
<#
.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.
@patelcp
patelcp / Renderings.ps1
Created December 29, 2017 21:12 — forked from AdamNaj/Renderings.ps1
Rendering manipulation in PowerShell for Sitecore
$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
@patelcp
patelcp / import.ps1
Created December 29, 2017 21:08 — forked from pveller/import.ps1
Sitecore Content Import with Powershell
# 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()
}