eric s.
eric s.

Reputation: 51

Sitecore rocks update query syntax

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!

Upvotes: 1

Views: 75

Answers (1)

eric s.
eric s.

Reputation: 51

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
"

Upvotes: 4

Related Questions