Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
sobrenome Posted May 18, 2015 Posted May 18, 2015 Is there a template tag available on Pages to parse Youtube URLs to get advantage of responsive layout display?
不中用 Posted May 18, 2015 Posted May 18, 2015 Is there a template tag available on Pages to parse Youtube URLs to get advantage of responsive layout display?.I didn't see any YouTube tag yet .. I think it's just the normal iFrame / CSS routine .. .
Gabe Powless Posted May 18, 2015 Posted May 18, 2015 add the YouTube button with ckeditor through Themes 》Toolbars
opentype Posted May 18, 2015 Posted May 18, 2015 What are you trying to achieve? How would you want to use that tag?
sobrenome Posted May 18, 2015 Author Posted May 18, 2015 I am creating a custom database which one of the fields will be to record the related youtube url for the content.So I have to make a custom record display template to show the youtube video embended. I dont want to use the ckeditor for that.
不中用 Posted May 19, 2015 Posted May 19, 2015 I am creating a custom database which one of the fields will be to record the related youtube url for the content. So I have to make a custom record display template to show the youtube video embended. I dont want to use the ckeditor for that. . You will need the "template key" or also named "field key" to be set and then you can use that kind of tag in your "listing" or "display" template .. use it this way .. {$record->customFieldDisplayByKey('YouTube', 'display')|raw} .
sobrenome Posted May 19, 2015 Author Posted May 19, 2015 Yes, that's right.But what I want is a template tag to parse the youtube url to generate the responsive html output for youtube video.
不中用 Posted May 19, 2015 Posted May 19, 2015 Yes, that's right.But what I want is a template tag to parse the youtube url to generate the responsive html output for youtube video..I think what you want just happens automatically if you fit all the pieces together ..You make a YouTube field > you add a record > fill in the YouTube URL > save .. display the record > YouTube is responsive on its own, it will show the video embedded ..You creating a custom template > use the field key .. test your template .. Your YouTube should be responsive .... .
opentype Posted May 19, 2015 Posted May 19, 2015 Yes, that's right.But what I want is a template tag to parse the youtube url to generate the responsive html output for youtube video.Just add the 100% width as option to the YouTube field and make sure you output the field on its own line so it doesn’t share the space with other elements on that line.
sobrenome Posted May 19, 2015 Author Posted May 19, 2015 I will test in the template and will update this topic.
sobrenome Posted May 20, 2015 Author Posted May 20, 2015 Youtube url is not parsed to show youtube video.Do I have to use Youtube embend code and change width to 100%?<iframe width="100%" height="315" src="https://www.youtube.com/embed/xxxxx" frameborder="0" allowfullscreen></iframe>
opentype Posted May 20, 2015 Posted May 20, 2015 I just tried it. Added a YouTube field, added the 100% width parameter in the field options. Made sure the field is set to show the player: And I instantly get the responsive videos in the record view. If you change that last option to Plain URL you can of course put your embed code directly in the template. But I don’t think you have to.
sobrenome Posted May 20, 2015 Author Posted May 20, 2015 Now I get it! There is a Youtube type field! Nice!
不中用 Posted May 20, 2015 Posted May 20, 2015 Now I get it! There is a Youtube type field! Nice! . OMG !!! .
Recommended Posts
Archived
This topic is now archived and is closed to further replies.