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 content query web part that displays all the latest documents added to a site collection but there are one or two occasions where a file will be uploaded that the user doesn't want advertised as uploaded.

People should still have their normal access to the file but it shouldn't be returned as a result in the Content Query Web Part on the main page.

Is there a way to flag specific files on upload/creation so that they don't get displayed in a CQWP?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Add a new field to the document library, a Yes/No field.. asking user to select whether he wants the document to advertise or not.. Add a filter in Content Query Web Part for this field..

EDIT

For multiple document libraries

Approach 1:
Write a Powershell script to add this field to each document library.. Or using SharePoint Object Model add this field to document libraries..

Approach 2:
Make a site column i.e. Yes/No field, create a content type.. Add this field in the content type and make the document libraries to inherit this content type..

Either way you need to iterate all document libraries!

share|improve this answer
    
Is there a way that works for a number of libraries? This solution is good for one library but the site collection has several sites each with several document libraries. Would this field have to be added to each document library? –  Donald Dunlop Sep 30 '13 at 13:21
    
@DonaldDunlop see update on Answer –  Arsalan Adam Khatri Sep 30 '13 at 13:25

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.