demogorgorn/yii2-superfish-menu

Yii2 superfish jQuery menu widget

dev-master 2017-02-10 10:32 UTC

This package is auto-updated.

Last update: 2024-12-21 22:08:12 UTC


README

This is the Yii2 Superfish jQuery menu widget that renders a nice looking menu.

Example of usage of the widget.

 echo \demogorgorn\superfish\Superfish::widget([
    'options' => [
        'class' => 'uk-float-right',
    ],
    'items' => [
        ['label' => 'First level menu item', 'url' => ['/site/index']],
        ['label' => 'First level menu item', 'url' => ['/site/preimushestva']],
        ['label' => 'First level menu item', 'url' => ['/site/juridicheskie-uslugi']],
        ['label' => 'First level menu item', 'url' => ['/site/tarify']],
        ['label' => 'First level menu item', 'url' => ['/site/publikacii']],
        [
            'label' => 'First level menu item', 
            'url' => ['/site/kontakty'],
            'items' => [
                [
                    'label' => 'Second level menu item', 
                    'url' => ['/site/index'],
                    'items' => [
                        ['label' => 'Third level menu item', 'url' => ['/site/index']],
                        ['label' => 'Third level menu item', 'url' => ['/site/preimushestva']],
                        ['label' => 'Third level menu item', 'url' => ['/site/juridicheskie-uslugi']],
                        ['label' => 'Third level menu item', 'url' => ['/site/tarify']],
                        ['label' => 'Third level menu item', 'url' => ['/site/publikacii']],
                    ],
                ],
                ['label' => 'Second level menu item', 'url' => ['/site/preimushestva']],
                [
                   'label' => 'Second level menu item', 
                   'url' => ['/site/juridicheskie-uslugi'],
                   'options' => ['class' => 'li tag options'],
                   'linkOptions' => ['class' => 'link optionts'],   
                ],
                ['label' => 'Second level menu item', 'url' => ['/site/tarify']],
                ['label' => 'Second level menu item', 'url' => ['/site/publikacii']],
            ],
        ],
    ],
  ]);

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require demogorgorn/yii2-superfish-menu "*"

or add

"demogorgorn/yii2-superfish-menu": "*"

to the require section of your composer.json file and run composer update.