从sitecore

时间:2015-08-20 11:57:21

标签: sitecore

如果我使用以下代码as shown in example在标题创建项目下的代码后面的sitecore中创建项目:

//Now we can add the new item as a child to the parent
    parentItem.Add("NewItemName", template);

然后为了从sitecore数据库中获取这个新添加的项目我应该做什么?因为我不知道身份证。

1 个答案:

答案 0 :(得分:2)

add方法将返回新项目。

EG。

Item newItem = parentItem.Add("NewItemName", template);
相关问题