Don’t we all love Content Query Web Part in MOSS 2007. Its a powerful tool to display content from other sites.

We do come to a dead end when the requirement is to display fields other than the one’s available out of the box or to show context menu.

It is amazing to see how an ordinary user (doesn’t have to be a developer) can modify the .webpart file to customise it. follow the steps given on microsoft technet site:

http://msdn2.microsoft.com/en-us/library/ms497457.aspx

you will notice that CommonViewFields property can be changed easily. you will need to know the type of the column. The list is not given in the article. you can get it here:

Field Name

Description
AllDayEvent Specifies an all day event. 
Attachments Contains attachments. 
Boolean Contains Boolean values that are stored in the database as 1 or 0
Calculated Contains calculated values. 
Choice Specifies a predetermined set of values that can be used to enter data into the field. 
Computed Specifies an abstract field type that depends on other fields for its content and definition. 
ContentTypeId Contains a content type ID.  
Counter Contains an integer used for internal ID fields. 
CrossProjectLink Specifies a link between projects in a Meetings Workspace site. 
Currency Contains currency values formatted based on a specific locale. 
DateTime Contains date and time values. 
Error Contains errors. 
File Contains files. 
GridChoice Specifies a Choice field for a data sheet. 
Guid Contains GUIDs. 
Integer Contains positive or negative integer values. 
Invalid Not used. 
Lookup Contains references to values in other lists. 
MaxItems Contains the maximum number of items. 
ModStat Specifies Content Approval status. 
MultiChoice Contains multiple values per list item. 
Note Specifies a field that can contain multiple lines of text. 
Number Contains floating point numbers. 
PageSeparator Inserts a page break in a survey list. 
Recurrence Specifies a field used in calendars for recurring events and, like computed fields, an abstract field type that depends on other fields for its content and definition. 
Text Contains a single line of text. 
ThreadIndex Contains the ID that indicates the relative position of a message within a conversation thread. 
Threading Specifies a field that is used in the creation and display of threaded Web discussions. 
URL Contains hyperlinks. 
User Specifies users of a SharePoint site. 
WorkflowEventType Specifies a workflow event type. 
WorkflowStatus Specifies workflow status. 

Enhanced Content Query Web Part created by my colleague Ishai Sagi is an amazing web part: http://www.codeplex.com/ECQWP

Heather Solomon provides the easy approaches of not just customising the Web Part but to apply custom styles as well. Look for step by step details here: http://www.heathersolomon.com/blog/articles/customitemstyle.aspx