try
{
masterDb = Factory.GetDatabase("master");
Sitecore.Data.Database masterdb = Sitecore.Configuration.Factory.GetDatabase("master");
Sitecore.Data.Items.Item srpackshome = masterdb.GetItem("/sitecore/content/home/Sports Recreation/Packs");
Sitecore.Collections.ChildList children = srpackshome.Children;
foreach (Sitecore.Data.Items.Item child in srpackshome.GetChildren())
{
TreeNode srPacksItem = new TreeNode(child.Name.Substring(child.Name.LastIndexOf(Path.DirectorySeparatorChar)+1));
//TreeNode srPacksItem = new TreeNode(srpackshome.Name.Substring(srpackshome.Name.LastIndexOf(Path.DirectorySeparatorChar)+1));
treeSR.Nodes.Add(srPacksItem);
}
---------------------------
using the above code I am trying to pull information from Sitecore and into the Web application to put the content into the treeview nodes.
The treeview consists of 4 levels. I am just trying to get the childrens children in from sitecore. The children will be static and I am referencing their folder in sitecore to pull their children into the application. It is not connecting.
Is there anyone familiar with sitecore that could help?
Loading
Praveen SreeramPosted Sep 2, 2016, 10:07 AM
Suthish NairPosted Oct 10, 2011, 11:14 AM