Wednesday, February 27, 2008

Display Custom Field in a Content Query Web Part

Today I struggled with a problem when trying to display a custom field into my CQWP. I tried to display a custom field whose internal field consist of two parts. eg. News Date.

When I filled in the internal field name this way:
<.property name="CommonViewFields" type="string".>News Date,Text;<./property.>" the field didn't render.

Solution
<.property name="CommonViewFields" type="string".>News_x0020_Date,Text;<./property.>"

The characters _x0020_ represent the blank space.

No comments: