The code below works for returning all pages for the listed publication, along with the CT's & CP's referenced by those pages. How can I easily get the schemas used by the PT's & CT's also? I don't want to list all schemas, just the ones actually being used.
RepositoryItemsFilterData filter = GetPageFilter();
StringBuilder sb = new StringBuilder();
client = new CoreServiceSession().GetClient;
IdentifiableObjectData[] pages = client.GetList("tcm:0-999-1", filter);
foreach (IdentifiableObjectData iod in pages)
{
PageData pageData = client.Read(iod.Id, new ReadOptions()) as PageData;
sb.AppendLine("Page: " + pageData.Title);
foreach (ComponentPresentationData cpd in pageData.ComponentPresentations)
{
sb.AppendLine("CP: " + cpd.Component.Title);
sb.AppendLine("CT: " + cpd.ComponentTemplate.Title);
}
//blank line for readability
sb.AppendLine("");
}
return "";