Content Query Web Part - Filter Contents of Document Library
I would like to display selective content of document library using content query web part. My document library has multiple folders. I would like to have the content query web part display the contents of one particular folder. And also another content query should display the contents based on a column in the document library. I don't see these options when customizing the query for the content query web part. If this is not possible by default, what is the potentail alternative solution ? I know I can do filtering by views, but this will not help in my case as I need to display the web part on multiple pages in the site.
June 25th, 2010 5:11pm

For the folder CQWP, I'm not sure how you could do that, unless each of the files had something in common, such as part of the filename. That would also require all of the other files not in that folder to not have that same filename commonality. You can definitely add additional filters to the CQWP. Have you read this article? http://msdn.microsoft.com/en-us/library/aa981241.aspx. It explains how you can add additional filters.
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2010 7:33pm

You may want to consider the Data Form Web Part (DFWP) as an alternative to the CQWP, given the constraints you are asking for. The DFWP allows for the creation of XSL that will allow you to filter information as you have described. It also allows for more advanced things like conditional formatting, data source joins, etc. The best way to see if this would work for you is to use SharePoint Designer to generate a Data Source from your list and then conditionally format it using the GUI to generate your basic XSL - it may well be that you never actually have to touch the XSL code, but it is there if you need it. Start with the major objectives, working your way down to the minor ones, saving working copies often. The created DFWP can simply be exported to save multiple copies along the way. Troy Lanphier http://blog.sharepointcookbook.com
June 28th, 2010 8:25pm

Thanks. I tried Data Form Web Part and filter by column, conditional formatting, recursive etc., work great. However, I am not able to figure out how to filter by a folder within Document library. I want to display only contents of a specific folder within a document library.
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2010 5:08pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics