Template:YouTube: Difference between revisions
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
{{#widget:YouTube|id={{{1}}}|width={{#switch:{{{2}}}|small=356|medium=560|big=640|large=854|100%}}}} | {{#widget:YouTube|id={{{1}}}|width={{#switch:{{{2}}}|small=356|medium=560|big=640|large=854|100%}}}} | ||
<!-- mandatory properties for google rich snippets --> | <!-- mandatory properties for google rich snippets --> | ||
{{#get_web_data:url=https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id={{{1}}}&key=AIzaSyC-zQp-SoOYbKh64GrNhBK5D3g7H9oX7Zs|format=json}} | {{#get_web_data:url=https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id={{{1}}}&key=AIzaSyC-zQp-SoOYbKh64GrNhBK5D3g7H9oX7Zs|format=json with jsonpath}} | ||
<meta itemprop="name" content="{{#ask: [[Category:YouTube videos]] [[YouTube video ID::{{{1}}}]] |link=none |default={{#external_value:title}} }}"/> | <meta itemprop="name" content="{{#ask: [[Category:YouTube videos]] [[YouTube video ID::{{{1}}}]] |link=none |default={{#external_value:title}} }}"/> | ||
<meta itemprop="description" content="{{#ask: [[Category:YouTube videos]] [[YouTube video ID::{{{1}}}]] |link=none |default={{#external_value:title}} }} on the YouTube channel." /> | <meta itemprop="description" content="{{#ask: [[Category:YouTube videos]] [[YouTube video ID::{{{1}}}]] |link=none |default={{#external_value:title}} }} on the YouTube channel." /> | ||
| Line 10: | Line 10: | ||
<!-- non-mandatory properties for google rich snippets --> | <!-- non-mandatory properties for google rich snippets --> | ||
<meta itemprop="duration" content="{{#external_value:duration}}" /> | <meta itemprop="duration" content="{{#external_value:duration}}" /> | ||
</div>{{#if: {{{4|}}} | | <br style="clear:{{{3|left}}};" /> }}{{#ifeq: | </div>{{#if: {{{4|}}} | | <br style="clear:{{{3|left}}};" /> }}{{#ifeq: | ||
{{#ask: [[YouTube video ID::{{{1}}}]] | {{#ask: [[YouTube video ID::{{{1}}}]] | ||