Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Embedding a YouTube video within a Transformation View modes: 
User avatar
Member
Member
Bev - 7/26/2012 9:57:13 AM
   
Embedding a YouTube video within a Transformation
Afternoon,

I'm hoping someone might have done this already and know how this can be implemented.

I've created a new document type to hold details of a YouTube video (URL, Video Name). I also have another document type that holds details of a musical act, so a musical act may have one or more YouTube videos underneath it.

What I want to do is on the artist's page, have a repeater which will show all the YouTube video's each in their own individual embedded video player.

But I'm having issues creating the transformation so that it will create the embeded video player with the YouTube URL. I know I can do it by using the ID of the YouTube video, but I am concerned that the end user of the site will not always grab the ID correctly and wondered if there was a way of doing it with using the full URL (which is just copied and pasted from the YouTube website)??

Thanks in advance for any info and tips.

Bev

User avatar
Kentico Support
Kentico Support
kentico_janh - 7/27/2012 2:33:58 AM
   
RE:Embedding a YouTube video within a Transformation
Hello,

The problem is, that youtube can't play embed videos with using the full URL, but you can add a custom function to the transformation which takes full stored URL and returns just an ID of that video, so your users can just copy and paste the full URL from the address bar.

Best regards,
Jan Hermann