Reputation: 1289
Can you please explain how to get the list of Components in a Folder based on it's WebDAV URL in C# by using Tridion's TOM.NET API.
Upvotes: 4
Views: 1106
Reputation: 123
List<RepositoryLocalObject> myLookComponentList =
(List<RepositoryLocalObject>)folder.GetItems(filter).ToList();
Upvotes: 0
Reputation: 13483
var folder = (Folder) session.GetObject("/webdav/Test/Building%20Blocks/Default%20Templates");
var filter = new OrganizationalItemItemsFilter(session);
var listXml = folder.GetListItems(filter);
The GetItems
method will return you a list of objects while GetListItems
returns an XML element. Depending on the version of Tridion you are using you might not have GetItems
method implemented yet
You can set additional properties on filter variable.
Upvotes: 2