I have created a out the box team site, and in a document library I have uploaded 3 files. (These files could be in different libraries)

I have added a Content Query WebPart to my page, and set the query to

  • Source: Show items from all sites in this site collection
  • List Type: Document Library
  • Content Type: Document Content Types - Document - Include Child Content types
  • Sorted by Created Items.

When it displays the results to me I get the following: CQWP results

I don't mind editing the Webpart XML if needs be, but how do I ensure that it only shows "MS-Office type documents" so that only "New User Handbook", "Dev Invoice April", and "Account details" are showing in my example below?

Also in the Site Assets library I have a OneNote file of Content Type Document. Is there a reason why this isn't showing up here?

  • Have you tried to adjust you query to limit by file type(s) & only allow xslt,pdf,doc,docx,etc.. – user13186 Apr 28 '14 at 14:18

Probably the most simple way would be to filter documents by file type.

DocIcon field specifies the document icon that is associated with the creation of the specified template document object. Bu default this field is not available in CQWP.

How to configure CQWP to filter documents by file type

1)Export CQWP

2)Locate CommonViewFields element and set value DocIcon,Lookup

Example: <property name="CommonViewFields" type="string">DocIcon,Lookup</property>

3) To make it available for filtering, locate AdditionalFilterFields element and set it value to DocIcon.

Example: <property name="AdditionalFilterFields" type="string" >DocIcon</property>

4) Save changes and upload web part, add web part on the page.


Specify file types to display using Additional Filters property

enter image description here

| 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.