Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a CQWP that is pulling all recently added list items as a display of, "What's new" on a site collection. The problem I have encountered however is that the CQWP's query has to have a default list type that it pulls through information for.

Is it possible to pull through list items from Document Libraries as well as announcement lists and custom lists?

share|improve this question

1 Answer 1

You will need to use QueryOverride property of CQWP. For example:

<property name="QueryOverride" type="string"><![CDATA[<Where><Or><Eq><FieldRef Name="ContentType"/><Value Type="Computed">Company Announcements</Value></Eq><Eq><FieldRef Name="ContentType"/><Value Type="Computed">Announcement</Value></Eq></Or></Where>]]></property>

In your case you will need to specify content type of document library and announcement. For more information on how to customize CQWP, please refer this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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