예제 #1
0
 private void AddItemToCache(Sitecore43Item item)
 {
     // Add to cache two times because we might request it by key or by path
     if (!_existingTemplates.ContainsKey(item.ID.ToLower()))
         _existingTemplates.Add(item.ID.ToLower(), item);
     if (!_existingTemplates.ContainsKey(item.Path.ToLower()))
         _existingTemplates.Add(item.Path.ToLower(), item);
 }
예제 #2
0
 public static Sitecore43Item GetItem(string sItemPath, Sitecore43.SitecoreClientAPI sitecoreApi)
 {
     //            XmlNode node = sitecoreApi.GetItem(sItemPath);
     XmlNode itemXml = sitecoreApi.GetItemXml(sItemPath, "", "");
     Sitecore43Item item = new Sitecore43Item(itemXml, null, sitecoreApi);
     item.SetAPIConnection(sitecoreApi);
     return item;
 }