I'm a complete newb in Umbraco, know nothing about ASP.NET, and am utterly lost ... so pelase be gentle.
I am working on a site that needs a video player and decided to go with JW Player because that is what I am most familiar with. I created the XLST and Macro and everything is working except for the image thumbnail.
I may be missing a step (since I am new to this) or there may be something wrong with my code. I basically took the videoNode (which works) and duplicated it for the imageNode.
I think your issue is that your XSLT for the imagepath is looking for a "File" element where it should be an "Image" element. The XML in Umbraco stores as elements of the Document or Media Type's alias, for example <Homepage> or <Image>, <File>, etc. (more info here) Normally this isn't an issue using GetMedia etc, but the mediaCurrent macro parameter happens to return the parent element as well.
Adding JW Player ... Need a little help
Thank you in advance for any help provided...
I'm a complete newb in Umbraco, know nothing about ASP.NET, and am utterly lost ... so pelase be gentle.
I am working on a site that needs a video player and decided to go with JW Player because that is what I am most familiar with. I created the XLST and Macro and everything is working except for the image thumbnail.
I may be missing a step (since I am new to this) or there may be something wrong with my code. I basically took the videoNode (which works) and duplicated it for the imageNode.
---------------------------------------------------XLST---------------------------------------------------
---------------------------------------------------The Resulting Macro in the Editor---------------------------------------------------
---------------------------------------------------The Resulting HTML---------------------------------------------------
As you can see the "image" (thumbnail) is left blank. Everthing else works perfect.
---------------------------------------------------The Macro Parameters---------------------------------------------------
Hi,
Welcome to Umbraco!
I think your issue is that your XSLT for the imagepath is looking for a "File" element where it should be an "Image" element. The XML in Umbraco stores as elements of the Document or Media Type's alias, for example <Homepage> or <Image>, <File>, etc. (more info here) Normally this isn't an issue using GetMedia etc, but the mediaCurrent macro parameter happens to return the parent element as well.
So you can change to this:
Or to encompass any media type you could use this also:
Hope this helps,
Tom
Perfect! Thank you.
is working on a reply...