"# wow-slider" This is a test file for 'Yii2 advanced'
/* This is and will be upadated broken and fixed on a regular basis I don't want to misslead anyone */, (*1)
add a php file to the frontend assets dir VendorAsset.php, (*2)
<?php
/**
* Created by PhpStorm.
* User: rmill_000
* Date: 08/11/2017
* Time: 11:04
*/, (*3)
namespace frontend\assets;, (*4)
use yii\web\AssetBundle;, (*5)
class VendorAsset extends AssetBundle
{
public $sourcePath = '@vendor/robert-mill/wow-slider';, (*6)
public $css = [
'src/assets/css/wow.css',
];
public $js = [
];
}, (*7)
In the views Layout/main.php file
Add:
use frontend\assets\VendorAsset; // to the top of the page
Below this add:
VendorAsset::register($this);, (*8)
add the line
$this->render('@vendor/robert-mill/wow-slider/src/pages/slidr.php')
where you need to add the slider, (*9)