0

I need to display my custom list rows using a custom XSLT, so I have configured a CQWP to display these rows from this specific list. Although, even the Order by dropdown list displaying all list fields (even custom fields), some of them are not recognized within the XSLT code. Why some custom fields are display and some of them not?

The type of the list fields that are not being displayed is text (single or multiline).

Thanks.

1 Answer 1

1

To display additional fields in Content Query web part (CQWP) specify them in property CommonViewFields.

According to MSDN:

CommonViewFields are additional fields that you can request when retrieving data. You can format the fields as either "internalName" or "Guid", separated by semicolons. You can specify the field types by placing a comma after the internal name or the GUID

Usage

In order to display additional fields:

Internal Name: JobTitle Type:Text
Internal Name: JobDescription Type: Note

specify CommonViewFields property

<property name="CommonViewFields" type="string">JobTitle,Text;JobDescription,Note</property>

After that they could be used in XSLT, like that:

<xsl:value-of select="@JobTitle" />
2
  • Thanks for your answers. I just don't understand why some custom fields are displayed without any customization. Mar 8, 2013 at 22:05
  • You might have specified those fields in the web part properties. Check Presentation->Title and Description text fields Oct 23, 2014 at 10:28

Your Answer

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

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