DCSIMG
Filter Content Query Web Part by file type - itaysk

Filter Content Query Web Part by file type

Posted Tuesday, February 26, 2008 4:44 PM by Itay Shakury

CQWP doesn't have a "file type" property in it's filter drop down. This is how you add it:

  1. Insert a CQWP to a page and configure it as you would like.
  2. Export the web part and save it as ".webpart" file on your local computer.
  3. Open the ".webpart" file in a text editor. (I use SharePoint Designer)
  4. Look for the following line:
    <property name="CommonViewFields" type="string" />
  5. Replace it with the following line:
    <property name="CommonViewFields" type="string">DocIcon,Lookup</property>
    This will make the CQWP retrieve also the DocIcon field that basically include the file extention.
  6. Look for the following line:
    <property name="AdditionalFilterFields" type="Lookup" null="true" />
  7. Replace it with the following line:
    <property name="AdditionalFilterFields" type="Lookup" >DocIcon</property>
    This will make our CQWP to allow you to filter by our newly added DocIcon field through the filtering UI in the web part's toolpane.
  8. Save the file.
  9. Go to a sharepoint page and import the modified ".webpart" file into your page.

CQWP Filter Before and After

תגים:,

Comments

# Filter Content Query Web Part by file type

Tuesday, February 26, 2008 6:22 PM by SHAREPOINTBlogs.com Mirror

CQWP doesn&#39;t have a &quot;file type&quot; property in it&#39;s filter drop down. This is how you

# The Content Query Web Part &laquo; Path to SharePoint

Monday, June 08, 2009 7:50 AM by The Content Query Web Part « Path to SharePoint

Pingback from  The Content Query Web Part &laquo; Path to SharePoint

# re: Filter Content Query Web Part by file type

Monday, September 13, 2010 5:16 PM by jc

Is it possible to do this with Document Library column URL Path?

What kind of column is that?

How do I deal with the space in the column name?

I'm looking for a way to filter by folder name, but no clear way to do that .

Great potential in this. Thank You!

# re: Filter Content Query Web Part by file type

Wednesday, August 03, 2011 2:26 PM by Ankit Singhal

Great help. Thank you so much for sharing !

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: