Yii 2.0: yii2-tileslidemenu

Tile Slide Menu to show tiled images containing links
1 follower

This extension allows you to show a user menu based on tiled images sliding in the screen

This is a port to Yii2 of my previous extension tile-slide-menu

Requirements

  • Tested on Yii 2.0.0

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist arturoliveira/yii2-tileslidemenu "*"

or add

"arturoliveira/yii2-tileslidemenu": "*"

to the require section of your composer.json file.

Usage

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

<?= \arturoliveira\TileSlideMenu::widget(
    'menuTitle'=>'Yii Framework',
    'items'=>[
        [
            'text' => 'Main Site',
            'url'=>'http://www.yiiframework.com/',
            'urlTarget'=>'_blank'
        ],
        [
            'text' => 'Demos',
            'url'=>'http://www.yiiframework.com/demos/'
        ],
        [
            'text' => 'Guide',
            'url'=>'http://www.yiiframework.com/doc/guide/'
        ],
        [
            'text' => 'Class Reference',
            'url'=>'http://www.yiiframework.com/doc/api/'
        ],
        [
            'text' => 'Wiki',
            'url'=>'http://www.yiiframework.com/wiki/'
        ],
        [
            'text' => 'Extensions',
            'url'=>'http://www.yiiframework.com/extensions/'
        ],
        [
            'text' => 'Forum',
            'url'=>'http://www.yiiframework.com/forum/'
        ],
        [
            'text' => 'Live Chat',
            'url'=>'http://www.yiiframework.com/chat/'
        ],
    ]
); ?>

The following widget options are available:

  • cssFile - CSS File based on the included CSS file to customize the aspect of the menus

  • menuTitle - A string to show as a menu title. If empty no title is displayed

  • imageWidth - the value for width img tag property. Defaults to 100

  • imageHeight - the value for height img tag property. Defaults to 100

  • defaultImage - The default image to show if no image is configured for a menu item. Defaults to included Yii logo

  • defaultUrlTarget - The default url target. Uses the same allowed values as target property. See http://www.w3schools.com/tags/att_a_target.asp

  • items - array containing the menu items. Each item is allowed to have the following options:

    • visible - Boolean

    • imagePath - The path for the image to use on this menu item

    • urlTarget - The target for the menu item link. See http://www.w3schools.com/tags/att_a_target.asp

    • text - Item text to show bellow on mouse over

Resources

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet