I have the following code segment:

PublishedItemsFilterData publishedItemsFilterData = new PublishedItemsFilterData()
    BaseColumns = ListBaseColumns.Extended,
    IncludeTemplates = true
XElement publishInfoDataXElement = client.GetSystemWideListXml(publishedItemsFilterData);

which results in the following xml:

<tcm:ListPublishedItems xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:ext="http://www.tridion.com/ContentManager/R5/Extension">
    <tcm:Item ID="tcm:8-122" Title="Programming 1"></tcm:Item>
    <tcm:Item ID="tcm:10-122" Title="Programming 1"></tcm:Item>
    <tcm:Item ID="tcm:11-122" Title="Programming 1"></tcm:Item>

As you can see, see the IncludeTemplates is ignored and no extra column is included, however, when I query the Publish States table with the following query:


I get the following:

Query Result

which clearly has the template column set (is not null). What am I doing wrong, why doesn't the template column get included in the Core Service response?



It seems you have misunderstood the purpose of the IncludeTemplates property of the PublishedItemsFilterData filter.

This tells the GetSystemWideListXml whether to include Component Templates (as part of a published Dynamic Component Presentation) in the list, which otherwise would only include Pages, Components, Categories, and Target Groups.

Furthermore the API documentation also specifies the following remark on the PublishedItemsFilterData class:

List column Filter Default and Extended have no impact.

So it seems the list you are getting returned, indeed can only contain ID and title.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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