There are scenarios where we have to create item list in Sitecore - For example: Countries, States, Products or any dropdown item list.
Prerequisites
Sitecore PowerShell Extension must be installed.
List of items, for reference sharing list click to download CountryList, USStates, IndiaStates or any custom file.
Download script CreateBulkItem.ps1
Demo Time
Create a Sitecore item at below path
/sitecore/system/Modules/PowerShell/Script Library/SPE/Tools/Package Generator/Content Editor/Context Menu/Packaging
by duplicating existing script item and paste CreateBulkItem.ps1 as below (update list text path in script)
Execution Steps
Now right click on the item/folder, where wanted to create item list as per screenshot
Name and Value field's must have default value set as $name in template's standard value
Note: We can do this activity for different field values using json item list file, we only have to update PowerShell script and Sitecore steps will remains same .
No comments:
Post a Comment