Forum
Using YouTube video title as the item title in a multiple item region
I'm trying to take the title of a YouTube video and spit it out as the item title in a multi-item region, but it's still only displaying 'Item 1', 'Item 2' etc.
The code I'm using for the title is:
<perch:content id="resource_video" type="youtube" label="Title" output="title" title="true" suppress="true" />
And my full template can be seen below:
<perch:if exists="resource_video">
<div class="col-sm-6">
<div class="card">
<div class="card-content video">
<div class="embed-responsive embed-responsive-16by9">
<span class="embed-responsive-item">
<perch:content id="resource_video" type="youtube" width="100%" label="YouTube URL" output="embed" />
<perch:content id="resource_video" type="youtube" label="Title" output="title" title="true" suppress="true" />
</span>
</div>
</div>
</div>
</div>
<perch:else />
<div class="col-sm-12">
<div class="card">
<div class="card-content">
<p>Sorry, there are no videos available yet. Please check back soon.</p>
</div>
</div>
</div>
</perch:if>
I'm using the latest YouTube app with the new API – the videos display correctly, it's just the title that doesn't. Any idea where I'm going wrong?
I don't think you're doing anything wrong - just looking for functionality that doesn't yet exist.
No problem, I'll keep it in just in case it's added in future! The edit all on one page should get around it for now.
I've added it locally, so it'll be there in the future.
What a gentleman. Thank you.