Hi Drobar.
I have a macro called Youtube, this is the macro that users can select and embed in the rte editor. It is as follows.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes" />
<!-- Input the documenttype you want here -->
<xsl:variable name="videoSti" select="/macro/videoSti"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:value-of select="$videoSti" disable-output-escaping="yes"/>
</xsl:template>
</xsl:stylesheet>
It takes the embed code from the youtube site and displays it correctly on the article page.
The article is referenced on the homepage using another macro called "display featured item". The macro for that is as follows
Code:
<a href="{umbraco.library:NiceUrl($currentPage/data [@alias = 'featuredItem'])}">
<xsl:value-of select="umbraco.library:GetXmlNodeById($currentPage/data [@alias = 'featuredItem'])/@nodeName" />
</a>
<br/>
<xsl:value-of select="umbraco.library:GetXmlNodeById($currentPage/data [@alias = 'featuredItem'])/data [@alias = 'articleStrapline']" disable-output-escaping="yes" />
<xsl:value-of select="umbraco.library:GetXmlNodeById($currentPage/data [@alias = 'featuredItem'])/data [@alias = 'bodyText']" disable-output-escaping="yes" />
The element of the article that contains my video is the bodyText element.
Any other text or images in the bodyText element displays correctly, but when I look at the source of the page my video looks like this.
Code:
<?UMBRACO_MACRO videoSti="<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/20PQBtyfNZY&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/20PQBtyfNZY&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>" macroAlias="YouTube" />
Any help you can give would be great!