0

Hello and thank you in advance. I have added a custom field to my CQWP by the standard process of copying an existing xsl template in ItemStyle.xsl and then adding the additional field. The field displays in the web part properties, but in a weird format and the unfortunately the data does not display. Please see code and screenshot for example. You can see a weird "$resource" error or something like that?

        <td width="120px">
        <div class="description">
            <xsl:value-of select="ddwrt:FormatDateTime(string(@DatePublished),1033,'MMM d, yyyy')" />
          </div>
    </td>
    <!--Adam Add Amended Field-->
        <td width="120px">
        <div class="description_Amend">
            <xsl:value-of select="ddwrt:FormatDateTime(string(@Amended_x0020_Date),1033,'MMM d, yyyy')" />
          </div>
    </td>

enter image description here

1 Answer 1

1

The field names in ItemStyle.xsl are a little different. If we miss _x005f in the field name, it will break. Make sure to include the correct field names.

Example:

enter image description here

1
  • Thank you baker, this worked. For the sake of consistency, I re-created the names without a space. Then, after creation i added the space which does not update the internal field name. Thanks again!
    – Adam
    Jun 16, 2020 at 15:05

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.