Show the Body of Announcement at Content Query Web Part
-
martes, 12 de mayo de 2009 7:00
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" />.Please help.
I have read the following:
http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx
http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx
Todas las respuestas
-
miércoles, 07 de abril de 2010 21:15
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.
Andrew
- Propuesto como respuesta Becky Bertram jueves, 03 de junio de 2010 4:45
- Marcado como respuesta Mike Walsh FIN viernes, 04 de junio de 2010 3:15
-
miércoles, 02 de junio de 2010 21:02Thank you Andrew!
-
lunes, 19 de marzo de 2012 11:51Thanks Andrew for the response, please can you let me know where will i find the XSL file so that i can go ahead with the second step.
-
martes, 01 de mayo de 2012 15:39
Hi Tulajaram,
In case you haven't found it yet, that code will be on whatever page the Web Part is on and can be opened in Designer.

