Problem Showing RichText through XSLT Options
justin_kaizen
Posted: Wednesday, June 25, 2008 4:43:29 PM

Rank: Newbie

Joined: 6/25/2008
Posts: 10
Location: ottawa
My goal is to have a page like this:
[Main]
-[service 1]
-[service 2]

Visiting main shows the content of service 1 and service 2 through xslt by visiting the children nodes. This is done.

My problem is that all the HTML from the rich text box is coming through as:
<ul><li>Providing growth</li><li>We analyze</li></ul>
meaning you see the tags in the browser, and its encoded in HTML like &gt; in the source.

The Input in the rich text box is:
(bullet)Providing growth
(bullet)We analyze


And the Xslt used to pull this content is:
<xsl:if test="data [@alias='entryType']='Service'">
<strong><xsl:value-of select="data [@alias='entryTitle']"/></strong><br/>
<table>
<!-- <xsl:value-of select="data [@alias='entryHTML']/text()"/> -->
<tr><td>
<xsl:if test="data [@alias='entryPicture']!=''">
<img src="{concat(substring-before(data [@alias='entryPicture'],'.'), '_thumb.jpg')}" style="border: none;"/>
</xsl:if>
</td>
<td><xsl:value-of select="data [@alias='entryHTML']/text()"/><br/></td></tr>
</table>
<xsl:value-of select="data [@alias='entryLink']"/><br/>
</xsl:if>

where <xsl:value-of select="data [@alias='entryHTML']/text()"/> is the place that pulls the rich text.

Thanks much.
I'm sure i'm just not pulling the data correctly using xslt, as the other rich text box that gets pulled using <?UMBRACO_GETITEM ...> works fine and has the same structure.

Justin
drobar
Posted: Wednesday, June 25, 2008 4:52:07 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,541
Location: KY, USA
Look at the optional xsl:value-of parameter, disable-output-escaping="yes"... such as...

<xsl:value-of select="data [@alias='entryHTML']/text()" disable-output-escaping="yes" />

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
justin_kaizen
Posted: Thursday, June 26, 2008 10:25:07 PM

Rank: Newbie

Joined: 6/25/2008
Posts: 10
Location: ottawa
Great! That was perfect! exactly as stated!

Thanks for the help!!

Justin
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.