Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Show the Body of Announcement at Content Query Web Part

  Asked By: Conor    Date: Jun 17    Category: Sharepoint    Views: 6143

I attempt to show the Body of Announcement at Content Query Web Part.

Case 1
I get the following result:
The 1st line shows the Title as normal.
The 2nd line shows:
<div class=ExternalClass90BF9EBAACDA4DF59EBCBD401F04EBBF><div>Hello!</div></div>
It should be 'Hello!' only without the html code.

I tried the following at the webpart file:


<property name="CommonViewFields" type="string">Body, Note</property> or
<property name="CommonViewFields" type="string">Body, RichHTML</property> or
<property name="CommonViewFields" type="string">Body, RichText</property>.
Certainly, I have the following at the ItemStyle file:
<div class="description">
<xsl:value-of select="@Body" />.


Case 2
I get the following result:
The 1st line shows the Title as normal.
The 2nd line shows nothing of the Announcement Body.

I tried the following at the webpart file:

<property name="CommonViewFields" type="string">Body_x0020_content, RichHTML</property> or
<property name="CommonViewFields" type="string">Body_x0020_content, Note</property> or
<property name="CommonViewFields" type="string">Body_x0020_content, RichText</property>
with the ItemStyle file:
<div class="description">
<xsl:value-of select="@Body_x0020_content" />.

and
<property name="CommonViewFields" type="string">Body_x005F_x0020_content, RichHTML</property> or
<property name="CommonViewFields" type="string">Body_x005F_x0020_content, Note</property> or
<property name="CommonViewFields" type="string">Body_x005F_x0020_content, RichText</property>
with the ItemStyle file:
<div class="description">
<xsl:value-of select="@Body_x005F_x0020_content" />

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Robby Barr     Answered On: Jun 17

You have probably moved on from this problem but in case  someone else needs the answer:

First in the web  part you need to use this:


<property name="CommonViewFields" type="string">Body, RichHTML</property>

Second in your XSL you need to use this:
<xsl:value-of select="@Body" disable-output-escaping="yes"/>

Then you should be all set.

 
Didn't find what you were looking for? Find more on Show the Body of Announcement at Content Query Web Part Or get search suggestion and latest updates.




Tagged: