dx004 / m2-videogallery-widget
Magento 2 模块 - 视频画廊小部件
0.2.1
2019-10-17 15:36 UTC
Requires
- php: ~7.0.13|~7.1.3|~7.2.0
- magento/framework: ^100|^101|^102
This package is auto-updated.
Last update: 2024-09-18 02:21:58 UTC
README
Magento 2 模块 - 视频画廊小部件
安装
通过 composer 安装(推荐):在 Magento 2 根目录下运行以下命令
composer require dxx004/m2-videogallery-widget
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
使用
在 CMS 页面或块中,添加任何具有元素 ID 的容器,然后添加 YouTube 视频列表作为子元素,例如
<ul id="test-videogallery">
<li>https://www.youtube.com/watch?v=PhA0iyto4JA</li>
<li>https://www.youtube.com/watch?v=9A1QZHLHwr8</li>
<li>https://www.youtube.com/watch?v=yUVU6LZt2Bo</li>
</ul>
然后插入“插入小部件”的小部件
或
添加 HTML
<div>{{widget type="RVSolutions\VideoGalleryWidget\Block\Widget\Convert" container_id="test-videogallery"}}</div>
其中 container_id 是上面视频画廊元素的 ID。
使用的 JS 库
https://github.com/gijsroge/OwlCarousel2-Thumbs https://www.jqueryscript.net/slider/Youtube-Video-Carousel-OWL-Tube.html