SharePoint

How to display custom field in content query web part

Sometimes title of a list element contains to little information and you wish to display other field or fields in a content by query web part. You can achieve this by altering the .webpart file of a content by query web part.
First add a Content by query web part to the page. In the Query section select the source (a list), then set the list type and the content type.

In web part Edit menu select Export… and save .webpart to your local disk. Edit file with Notepad.

Search for a property tag “CommonViewFields” and enter:

<property name="DataColumnRenames" type="string">your_internal_filed_name,field_type</property>

Search for a property tag “DataColumnRenames” and enter:

<property name="DataColumnRenames" type="string">your_internal_filed_name,Title</property>

Save the file and upload the web part to your page.

Dodaj odgovor

Vaš e-naslov ne bo objavljen. * označuje zahtevana polja