Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ItemName Title Icon ...
- Blog1 Blog1 G:ImageBlog1.jpg
- Blog2 Blog2 G:ImageBlog2.jpg
- Blog3 Blog3 G:ImageBlog3.jpg
- try
- {
- foreach($record in $csv)
- {
- $path = "/sitecore/content/COM/Home/Blogs"
- $item = New-Item -Path $path -Name $record.ItemName -ItemType $record.Templates
- $item.Editing.BeginEdit()
- $item["ItemName"] = $record.ItemName
- $item["Title"] = $record.PageTitle
- #add other mappings ...
- $item.Editing.EndEdit()
- Write-Host "Item created: " $record.ItemName
- }
- }
- finally
- {
- $bulk.Dispose()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement