luc1/yii2-tourist Tourist Extension for Yii 2

Tourist Extension for Yii 2

  1. Installation
  2. Register Asset
  3. Usage

Yii2 extension for the the Tourist component: https://github.com/IGreatlyDislikeJavascript/bootstrap-tourist

The Tourist component is a fork of Bootstrap Tour: https://github.com/sorich87/bootstrap-tour

This extension reuses code from the yii2-bootstrap-tour extension: https://github.com/MyCademy/yii2-bootstrap-tour

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist luc1/yii2-tourist "*"

or add

"luc1/yii2-tourist": "*"

to the require section of your composer.json file.

Register Asset

class AppAsset extends yii\web\AssetBundle
{
    public $depends = [
        // other dependencies
        'luc\tourist\TouristAsset'        
    ];
}

Usage

Once the extension is installed, simply use it in your code by :

use luc\tourist\Tourist;

<?= Tourist::widget::widget(
    'clientOptions' => [ //Bootstrap Tour Options, see: http://bootstraptour.com/api/
        'steps' => [
            [
                'element' => "#element1",
                'title' => "Step 1",
                'content' => "Content of my step 1",
            ],
            [
                'element' => "#element2",
                'title' => "Step 2",
                'content' => "Content of my step 2",
            ],
        ],
    ]); 
?>
0 0
1 follower
10 downloads
Yii Version: 2.0
License: BSD-4-Clause
Category: User Interface
Developed by: 1Luc1
Created on: Oct 31, 2019
Last updated: (not set)
Packagist Profile
Github Repository