1
votes

I am trying to do a insert via Sitecore Rocks query analyzer. I am having trouble trying to set the path of the item upon creation.

My sample query so far:

import csv 
"
<@DefaultTemplate=/sitecore/templates/MyTemplate@>
@ItemName,@Path
NewItemName,'/sitecore/content/website/Data'
"

However, it continues to create the item in the root of the website. Thanks in advance!

1

1 Answers

4
votes

I was able to find a solution by setting the contextnode.

For anyone else with the same issue. The correct code is as follows:

set contextnode=/sitecore/content/website/Data; 
import csv 
"
<@DefaultTemplate=/sitecore/templates/MyTemplate@>
@ItemName
NewItemName
"