5

I am trying to find a list of bundles that contain a spcific component/page, I could not find a sample code, I searched the core services API doc, I found ContainingBundlesListInfo but I don't know how to use it.

any help is appreciated

3 Answers 3

8

please stop using WhereUsed for everything, it's quite heavy list and it affects performance a lot. There's a special filter to show bundles that contain the current item: ContainingBundlesFilterData.

string componentId = "tcm:5-4081";

CoreServiceClient channel = new CoreServiceClient();

ContainingBundlesFilterData filter = new ContainingBundlesFilterData();

var bundles = channel.GetList(componentId, filter);

There are also many nice properties on that filter.

0
6

This source code, will give you the list of bundles

string componentId = "tcm:5-4081";

CoreServiceClient channel = new CoreServiceClient();

UsingItemsFilterData filter = new UsingItemsFilterData();
filter.ItemTypes = new ItemType[] { ItemType.VirtualFolder };

XElement xBundles = channel.GetListXml(componentId, filter);
0
3

I imagine you will find it with a UsingItems filter

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.