I have one root site and three sub - sites each contains document libraries in it.

I put the content query web-part in the root site querying to the sub-site's document libraries. My problem is that I want to display the File Name along with its size. So, referred this MSDN article to add the column in the content query web part.

The changes I made after exporting is:

<property name="CommonViewFields" type="string"> FileLeafRef,File; FileSizeDisplay,Computed </property>


<property name="DataColumnRenames" type="string">FileLeafRef,File; FileSizeDisplay,Computed </property>

as recommended in the article.

But after importing the customized web part it shows the description only.

What should I do to display those two columns?

Please help.

2 Answers 2


In your example there is a typo error in DataColumnRenames property.

Since you are displaying File Name (FileLeafRef) along with its size (FileSizeDisplay), the proper value for DataColumnRenames property would be:

<property name="DataColumnRenames" type="string">FileLeafRef,Title;FileSizeDisplay,Description</property>

About DataColumnRenames property in CQWP

This property is used to map internal column names to the new column names in the XSLT transformations after the data has been retrieved.

The default XSLT transformations can render the following four fields: Title, Description, LinkUrl, and ImageUrl. In your DataColumnRenames property, verify that the names you specify match the names in the XSLT transformations; that is, Title, Description, LinkUrl, and ImageUrl.


While the method you have used to include the columns should still work it is no longer necessary with 2010. However, just including the column is not enough, you also need to add the XSLT to display it.

There is a post on my blog which should point you in the right direction http://paylord.wordpress.com/2012/09/28/cqwp-and-xslt-part-1/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.