Handy Snippet for Sitecore CMS - Part 4 - Getting items from a Treelis(hockblogs.net)
submitted by
hockman(505) 2 years, 2 months ago
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....
}
|category: Other
|Views: 14
tags:
another
Everyones tags:
No tags
Your Tags: