My first article on MSDN Belux:
http://www.microsoft.com/belux/msdn/nl/community/columns/stevenvandecraen/contentquerywebpart.mspx
It was written for MOSS 2007 Beta 2 but still very much applies to MOSS 2007 RTM.
Trackback Url
Hi Steven! As I can not become successful, export web part and add string ProjectProperty.Title correctly? After import web part on the web page, don't see column Site Name. What not so?
"ProjectProperty.Title"
"property name="ViewFieldsOverride" type="string" ProjectProperty.Title property"
Hi Steven, Good post about the Content Query Web Part. I do have one question. Is it possible to link to the My Site of the author. In your code example only the author's name was displayed. I think it would be a nice enhancement if you can link to his/her My Site... Thanks in advance, Willem
Good question, Willem. You could do it in multiple ways, I'm not sure which would be the best. You could render the Presence Information Icon using the user's email address. You would have to incorporate the following markup: {1} Another option is to build the link to the UserInfo.aspx page using the User ID. This page will redirect to the MOSS Profile Page if available: /_layouts/userdisp.aspx?ID={0} Regards.
Good question, Willem. You could do it in multiple ways, I'm not sure which would be the best.
You could render the Presence Information Icon using the user's email address. You would have to incorporate the following markup:
{1}
Another option is to build the link to the UserInfo.aspx page using the User ID. This page will redirect to the MOSS Profile Page if available:
/_layouts/userdisp.aspx?ID={0}
Regards.
Hi Steven, Excellent post! It is very usefull. I have tried to group the result by using a column created directly in the list but the column doesn't appear as available column in the dropdown list. Same thing for the filter field. Is there a way to customize the web part to use specific column to group or filter the query content web part ? Thanks for your help. Luc
You can export the Web Part and specify the Group By / Filter By properties directly in the XML. This requires you to use either the Field ID or Internal Name ! You might want to set up a grouped/filtered web part and export it to see the various possibilities. I believe your fields must be 'known' on site level where the Web Part lives, so you could try to use Site Columns for your items and web part.
It works! Finally, you just have to replace the GroupBy property with the column name. The column can be created directly in the list. It is not necessary to be a 'Known' column at the site level. Here's my case: TypeLien Thanks for your excellent support !
Hi Steven! Excellent post! Please, tell me, how to display in CQWP the name of subweb?
Boris, only when you specify 'Group By ' you can display the site name using . If you don't want this you can specify a ViewFieldsOverride with the ProjectProperty Title included. This is a default Cross Site Query and you should be able to find examples on MSDN.
Boris, only when you specify 'Group By ' you can display the site name using .
If you don't want this you can specify a ViewFieldsOverride with the ProjectProperty Title included. This is a default Cross Site Query and you should be able to find examples on MSDN.
Hi Steven! Big thank for your support! Post super! I wish to deduce in the CQWP a name of subweb and a name of library of documents, but a grouping to me it is necessary to disconnect.
Evgeny, you can export the web part and add a ViewFieldsOverride with the desired view fields (can be both a Field as ProjectProperty. The latter is used to display eg the web title (ProjectProperty.Title). Have a look at http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.viewfields.aspx
Name
Url
Email
Comments
CAPTCHA Image Validation