YouTube video output as text?
Hi,
I'm having trouble adding a youtube video to a page. I've added it into my collection using the following code:
<perch:content id="brandpage_video" type="youtube" label="YouTube URL"/>
and it displays a thumbnail below it perfectly in the Control Panel.
However when I go to the page with the code below it just shows me the URL of the youtube video in text, without actually processing it?
I must be doing something really simple, really wrong :) Any help would be great thanks. <perch:content id="brandpage_video" type="youtube" />
Can we see your complete template and Diagnostics Report please?
To actually embed the player you need to use:
Hi,
The entire template, which is a collection template is:
<style type="text/css"> body { background-image: url('<perch:content id="brand_background" />'); } </style>
<div class="container">
</div>
Called from:
<section>
(I'd put this in the black coding format but the 'how to mark up your post' link doesn't work)
Then the actual data is just a collection with the following relevant line:
<p><perch:content id="brandpage_video" type="youtube" label="YouTube URL"/></p>
Sadly the output=embed thing didn't work.
I thought it maybe php_curl not being activated but I'm using WAMP and it seems to be enabled.
and the Diagnostics Report? It's really hard to help unless we can see a full picture which is why we ask for these things when you create a thread.
Sorry, I totally forgot that...
There
type
attribute is required - so this won't work:try this:
Yay, sort of. I've got two big errors now:
I assume this is because I've debug on?
Either way, I've got a responsive site, if I were to set width to 100% would that work?
Thanks for your help :)
Ah - I think you need to set a pixel width and height for the embed.
I've added the height and width but I still get the error. The full error is below:
Boom. Ok, let me take a look at it and get back to you.
Could it be because I'm still on 2.8.8 ?
How about if you change
output="embed"
tooutput="player"
?It removes the error, but sadly it just turns the video into text of the youtube link again.
As in, it displays the YouTube video URL?
Yeah, it just shows the address effectively, eg:
https://www.youtube.com/watch?v=pCClM
Hmm. Are you on the latest version of the YouTube field type?
I believe so, I only downloaded it a day or two ago.
Hmm. I can't reproduce that. You're a little behind in your Runway version - can you update?
Updated to .13 now and I still have the errors sadly :(
The video is displaying fine below btw, its just I have these error messages above it.
Are you still using
embed
?