This article will show you how to use Content Query webpart for MOSS 2007.
How to use Content Query Web part in MOSS site:
1. How to Add a Content Query Web Part.
Click on Site Actions >> Edit Page
2. Now for add a Content Query Web Part to our page
Click on Add a Web Part
3. Now from the popup window like below from all web part list select checkbox content Query Web Part
And click on Add button.
4. Now click on edit on the right top and then from the popup menu click on modify Shared Web Part Like below.
5. Now Content Query Tool Part is Open.
6. Now you can select from the tool part according to the result you wan’t.
Now Click on + sign on front of Query sub menu is open from that you can select option and according to that result will be generated.
Now from the submenu you can filter out from that
From the source:
If you want to display items from the entire site check radio button in front of that.
If you want to display items from your selected site and sub site then check radio button in front of that click on browse button and select the site as you want items from that to display.
You can also select item from the list
7. You can also filter out your items from the list type as you choose from the dropdown control. Option like document library, custom list, post, task, workflow History, picture library, pages library are there and can choose any option from that.
8. You can also filter out your answer according to content type you choose.
9. You can also filter out your answer from the additional filters menu.
Whichever query you passed according to that the items will be displayed on web part.
10. Click on Presentation menu drop down list is open from that you can sort your answer like descending and ascending and also you can filter your answer group wise.
You can display your items on web part in no. of column as you choose.
You can also limit no. of items to display in web part
11. You can apply group style and item style in no. of ways as you want.
12. You can also change appearance of web part.
Like change title of the web part ,change height and width of a web part.
13. From the Layout menu you can apply direction like right to left, left to right, none for displaying items in web part.
14. You can also place your web part in any zone like Top, bottom left zone, bottom right zone.
From advanced menu you can select checkbox for item you want to display
Option are Allow minimize, allow close, allow hide, allow zone changes, allow connections.
If allow minimize checkbox is selected then you can minimize your web part
If allow close items is selected then you can close your web part.
After making all the changes Click on ok button or Apply button you web part is display on page like below. When you click on any item you can redirect directly on that page.