Getting properties for a set of items
To retrieve information about a set of items that are not in the same Folder, Structure Group, or other container, using the TOM.NET API you can specify a set of item IDs of repository-local objects and retrieve those items' properties.
For example, the Components used in the Component Presentations of a Page may be located in different Folders and you may want to retrieve their properties. To do this, do the following:
- Create an object of type
IEnumerable<string>that contains the IDs of the items you want to investigate. - Create a
RepositoryLocalObjectsFilterobject and set itsItemIdsproperty to this object. - Pass the filter to a call to either
SystemManager.GetRepositoryLocalObjects()orSystemManager.GetListRepositoryLocalObjects().
The Core Service also exposes this functionality, providing the same ItemIds property in its equivalent RepositoryLocalObjectsFilterData class, of which you would then pass an object to either ICoreService.GetSystemWideList() or ICoreService.GetSystemWideListXml(). Refer to the Core Service API documentation for details.