Addon for Bear Framework
This addon enables you to easily create multiple types of navigations for your website.
Install via Composer
composer require ivopetkov/navigation-menu-bearframework-addon
Download an archive
Download the latest release from the GitHub page and include the autoload file.
include '/path/to/the/addon/autoload.php';
Enable the addon for your Bear Framework application.
$app->addons->add('ivopetkov/navigation-menu-bearframework-addon');
<component src="navigation-menu">
<ul>
<li><a>Button 1</a></li>
<li><a>Button 2</a>
<ul>
<li><a>Button 2.1</a></li>
<li><a>Button 2.2</a></li>
<li><a>Button 2.3</a></li>
</ul>
</li>
<li><a>Button 3</a></li>
</ul>
</component>
type
The type of the navigation. Available values: horizontal-down, vertical-left, vertical-right, list-vertical, list-horizontal
moreItemHtml
The HTML code for the more item. Must contain li and ul tags. Example: <li><a>...</a><ul></ul></li>
class
HTML class attribute value
style
HTML style attribute value
The navigation will be horizontal and submenus will show bellow. If there are too many first level items, a more item will be shown.
<component src="navigation-menu" type="horizontal-down">
<ul>
<li><a>Button 1</a></li>
<li><a>Button 2</a>
<ul>
<li><a>Button 2.1</a></li>
<li><a>Button 2.2</a></li>
<li><a>Button 2.3</a></li>
</ul>
</li>
<li><a>Button 3</a></li>
</ul>
</component>
The navigation will be vertical and submenus will open to the right.
<component src="navigation-menu" type="vertical-right">
<ul>
<li><a>Button 1</a></li>
<li><a>Button 2</a>
<ul>
<li><a>Button 2.1</a></li>
<li><a>Button 2.2</a></li>
<li><a>Button 2.3</a></li>
</ul>
</li>
<li><a>Button 3</a></li>
</ul>
</component>
Navigation menu addon for Bear Framework is open-sourced software. It's free to use under the MIT license. See the license file for more information.
This addon is created by Ivo Petkov. Feel free to contact me at @IvoPetkovCom or ivopetkov.com.