• Priority: Medium
  • Status: Waiting on customer
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 02.08.22, 17:02
  • Opened by: David Landouzy

Ticket #23634 - video youtube

Hello ,

I have this on Head :

{/block}

{block name='head_scripts'}
	<script async src="{$cdn}.js"></script>
	{if ($page != 'checkout') && ($page != 'order')}
	<script async custom-element="amp-form" src="{$cdn}/amp-form-0.1.js"></script>{/if}
	<script async custom-element="amp-list" src="{$cdn}/amp-list-0.1.js"></script>
	<script async custom-element="amp-bind" src="{$cdn}/amp-bind-0.1.js"></script>
	{if ($page != 'home')}
	<script async custom-element="amp-youtube" src="{$cdn}/amp-youtube-0.1.js"></script>
	{/if}
	<script async custom-element="amp-sidebar" src="{$cdn}/amp-sidebar-0.1.js"></script>
	<script async custom-element="amp-carousel" src="{$cdn}/amp-carousel-0.2.js"></script>
	<script async custom-element="amp-selector" src="{$cdn}/amp-selector-0.1.js"></script>
	<script async custom-element="amp-lightbox" src="{$cdn}/amp-lightbox-0.1.js"></script>
	<script async custom-element="amp-accordion" src="{$cdn}/amp-accordion-0.1.js"></script>
	<script async custom-element="amp-video" src="{$cdn}/amp-video-0.1.js"></script>
	<script async custom-element="amp-bodymovin-animation" src="{$cdn}/amp-bodymovin-animation-0.1.js"></script>
	{if isset($amp.config.general.cookies) && $amp.config.general.cookies == 1}
	<script async custom-element="amp-user-notification" src="{$cdn}/amp-user-notification-0.1.js"></script>

But when I put this it doesn’t work :

<amp-youtube

  data-videoid="hQUV6ABPP6U"
  layout="responsive"
  width="480" height="270"></amp-youtube>

Comments

Fred 03 Aug 2022, 13:00

Hi, David.
I just created a new simple widget where you can just add your own AMP HTML markup
Use this file
/modules/pkamp/views/templates/front/widgets/widget_customcode.tpl
As you can see it works now, I just added it to your home page

David Landouzy 03 Aug 2022, 13:13

Fred,

Thank you , it's work fine !!

Fred 03 Aug 2022, 13:29

You are welcome!