1. Go to this page and download the library: Download alexeevdv/yii2-shortcodes library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace frontend\widgets;
class GalleryWidget extends \yii\base\Widget
{
public $id;
public $theme;
public function run()
{
// render your gallery here using $id and $theme
}
}
//Anywhere in your layouts, views or rendered content:
[gallery id=413]
bash
$ php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.