Hi there,

Part 4 of my handy snippets section. This time, getting the items from a Treelist.

Sitecore.Data.Items.Item item = Sitecore.Context.Item;

Sitecore.Data.ID[] ids = Sitecore.Data.ID.ParseArray(item["TreelistField"], false);

foreach (ID id in ids)
{
     Item target = Sitecore.Context.Database.GetItem(id);

     // Do something with the id....

}

Hope this is usefull!

gr,

Robbert

kick it on DotNetKicks.com

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList