<xsl:param name="currentPage"/> <xsl:variable name = "vidToPlay" select="/macro/videoNodeId"/>
<xsl:template match="/"> <xsl:if test="$vidToPlay != '' "> <xsl:value-of select="videoNode"/> <xsl:variable name="showMe" select="umbraco.library:GetMedia($vidToPlay/node/@id, 0)/umbracoFile" /> <div id="container" style="text-align: center;"> <a href="http://www.macromedia.com/go/getflashplayer">För att se filmen behöver du en flashspelare. Hämta den här.</a> </div> <script type="text/javascript" src="/endforward umbraco flv/jwplayer/swfobject.js" /> <!-- Move this to your template to make sure it's included only once. -->
<script type="text/javascript"> var s1 = new SWFObject("/endforward umbraco flv/jwplayer/player.swf","ply","460","290","9","#FFFFFF"); s1.addParam("allowfullscreen","true"); s1.addParam("allowscriptaccess","always"); s1.addParam("flashvars","file=<xsl:value-of select="$showMe"/>");
Displaying video with new xsl schema
Ive run the xsltupdater but it still doesnt work:
Getmedia is the problem. What is the right syntax?
Hi froad,
If the macro parameter videoNodeId is the ID of the media item (as the naming suggests), then the GetMedia call should just use that:
/Chriztian
Thx! Much easier than I thought :)
Another stupid question (im not very good at the new schema yet)
<xsl:variable name="videonode" select="/macro/videoNode"/>
<xsl:variable name="videopath" select="$videonode/node/data[@alias='umbracoFile']"/>
This is the old way to retrieve athe file. How should it be now?
Ive tried
<xsl:variable name="videopath" select="$videonode/node/umbracoFile"/>
and
<xsl:variable name="videopath" select="$videonode/umbracoFile"/>
videonode is a mediaCurrent.
is working on a reply...