2017 © Pedro Peláez
 

lithium-library li3_menu

Lithium simple menu generator

image

scharrier/li3_menu

Lithium simple menu generator

  • Friday, May 22, 2015
  • by scharrier
  • Repository
  • 3 Watchers
  • 5 Stars
  • 74 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Creating a menu in Lithium should be easy. This little helper does only one thing : it takes a menu, identifies the active link and render a ul/li menu., (*1)

Installation

Just add in your config/bootstrap/libraries.php :, (*2)

    Libraries::add('li3_menu') ;

And in your view :, (*3)

    $this->menu->display(array(
      'Home' => '/',
      'My pictures' => '/pictures'
    ));

Advanced usage

You can specify more params into your links by defining them as arrays : - url : destination (can be an array or a string) - mask : if you wan't to specify a more specific mask. By default, the mask is the destination url. - active : if you want to force an active item, set this to (bool) true. - class : if you want to add a css class to your item, (*4)

    $this->menu->display(array(
      'Home' => ['url' => '/', 'mask' => ['controller' => 'home']] // Will be active for all the Home controller actions
      'My pictures' => ['url' => ['controller' => 'pictures', 'action' => my], 'class' => 'my-pictures']
    ));

The Versions

22/05 2015

dev-master

9999999-dev http://github.com/scharrier/li3_menu/

Lithium simple menu generator

  Sources   Download

The Requires

  • php >=5.3.0

 

by Sebastien Charrier

navigation menu lithium li3