I would like to get all Pages using a Component that are in the current Publication, as shared from a Parent or a local Page.
Component and Page are in Blueprint Parent. Page is sometimes localized on other Publications (not this one, and do not want those). I want to get the Pages within this Publication and the Parent, but not other siblings.
However, my code gets all Pages in the system using the Component, the same results as the Tridion 'WhereUsed' functionality does in the GUI. (Which is correct behavior, I guess).
Below my code that gets all Pages everywhere.
Maybe I'll have to write some extra code that gets the Blueprint parents of my current Publication and if the Page is found there then add it to my results, but I hope not.
UsingItemsFilterData usingItemsFilterData = new UsingItemsFilterData
{
BaseColumns = ListBaseColumns.Default, // to specify the detail in the XML
ItemTypes = new[] { ItemType.Page, ItemType.Component} ,
IncludeLocalCopies = true
};
XElement usingXML = client.GetListXml(compUri, usingItemsFilterData);