2017 © Pedro Peláez
 

library fleximenu

A flexible menu buidler in PHP (originally lavary/fleximenu)

image

crazedsanity/fleximenu

A flexible menu buidler in PHP (originally lavary/fleximenu)

  • Friday, August 18, 2017
  • by crazedsanity
  • Repository
  • 3 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

fleximenu

A flexible menu builder in PHP, (*1)

Usage

add('Home', '');

$about = $menu->add('About', 'about');

// since this item has sub items we append a caret icon to the hyperlink text
$about->link->append(' ');

// we can attach HTML attributes to the hyper-link as well
$about->link->attributes(['class' => 'link-item', 'target' => '_blank']);

$about->attributes('data-model', 'nice');

$t = $about->add('Who we are?', array('url' => 'who-we-are',  'class' => 'navbar-item whoweare'));
$about->add('What we do?', array('url' => 'what-we-do',  'class' => 'navbar-item whatwedo'));


$menu->add('Portfolio', 'portfolio');
$menu->add('Contact',   'contact');

// we're only going to hide items with `display` set to **false**

$menu->filter( function($item){
    if( $item->meta('display') === false) {
        return false;
    }
    return true;
});

// Now we can render the menu as various HTML entities:

echo $menu->asUl( attribute('class' => 'ausomw-ul') );

//OR

echo $menu->asOl( attribute('class' => 'ausomw-ol') );

// OR

echo $menu->asDiv( attribute('class' => 'ausomw-div') );

?>

If You Need Help

Please submit all issues and questions using GitHub issues and I will try to help you :), (*2)

License

Fleximenu is free software distributed under the terms of the MIT license, (*3)

The Versions

18/08 2017

dev-master

9999999-dev

A flexible menu buidler in PHP (originally lavary/fleximenu)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar Lavary

18/08 2017

v0.1.0

0.1.0.0

A flexible menu buidler in PHP (originally lavary/fleximenu)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar Lavary