How to list existing folder components using WebDAV URLs in Tridion?

Could you please explain how to get the list of components in a folder based on WebDAV URL in C # using the Tridion TOM.NET API.

+4
source share
2 answers
var folder = (Folder) session.GetObject("/webdav/Test/Building%20Blocks/Default%20Templates"); var filter = new OrganizationalItemItemsFilter(session); var listXml = folder.GetListItems(filter); 

The GetItems method returns a list of objects, and GetListItems returns an XML element. Depending on the version of Tridion you are using, you may not have the GetItems method implemented GetItems

You can set additional properties in the filter variable.

+2
source
 List<RepositoryLocalObject> myLookComponentList = (List<RepositoryLocalObject>)folder.GetItems(filter).ToList(); 
0
source

Source: https://habr.com/ru/post/1400167/


All Articles