PHPackages                             mmoussa/zf1-navigation-view-helper-bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. mmoussa/zf1-navigation-view-helper-bootstrap

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

mmoussa/zf1-navigation-view-helper-bootstrap
============================================

A modified Zend\_View\_Helper\_Navigation\_Menu object that automatically applies the necessary id/class/data-toggle attributes to render dropdown menus compatible with Twitter Bootstrap.

111839PHP

Since Jul 13Pushed 12y ago1 watchersCompare

[ Source](https://github.com/michaelmoussa/zf1-navigation-view-helper-bootstrap)[ Packagist](https://packagist.org/packages/mmoussa/zf1-navigation-view-helper-bootstrap)[ RSS](/packages/mmoussa-zf1-navigation-view-helper-bootstrap/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/ede137831f174bcbe385f41357a7745db7fc5bac7576096692c253f3d29db56f/68747470733a2f2f7472617669732d63692e6f72672f6d69636861656c6d6f757373612f7a66312d6e617669676174696f6e2d766965772d68656c7065722d626f6f7473747261702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/michaelmoussa/zf1-navigation-view-helper-bootstrap)[![Coverage Status](https://camo.githubusercontent.com/66a1a22516bb55bbc07c352f57d24a463e137cde346845f818d2f486c796b0b1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d69636861656c6d6f757373612f7a66312d6e617669676174696f6e2d766965772d68656c7065722d626f6f7473747261702f62616467652e706e67)](https://coveralls.io/r/michaelmoussa/zf1-navigation-view-helper-bootstrap)

Description
-----------

[](#description)

This Zend Framework View Helper extends the existing **Zend\_View\_Helper\_Navigation\_Menu** view helper to render dropdown menus compatible with the format required in [Twitter Bootstrap](http://twitter.github.com/bootstrap/javascript.html#dropdowns). The automatic dropdown functionality requires adding various **class**, **id**, and **data-toggle** attributes, which Zend Framework's menu view helper doesn't natively support.

Instructions
------------

[](#instructions)

To use this helper in your Zend Framework project, import the **library/ZFBootstrap/View/Helper/Navigation/Menu.php** file into your project's **library** directory. You can change the ZFBootstrap name if you want - I don't care. =).

Next, simply add the following line of code somewhere in your project (ideally in your [Application Bootstrapping Code](http://framework.zend.com/manual/en/zend.application.examples.html)):

```
$view->registerHelper(new Menu(), 'menu');
```

This will replace Zend's Menu view helper with this customized one.

**Note:**

1. You'll need to **use ZFBootstrap\\View\\Helper\\Navigation\\Menu;** somewhere in that file, or **new Menu()** will fail.
2. **$view** is an instance of your view, and how you obtain it will depend on where you integrate this code. Consult the ZF documentation if you're not sure about how to get an instance of your view.

To activate a dropdown, just set the href of the dropdown trigger to **\#dropdownName**. The new helper will automatically find any hrefs beginning with **\#** set the **dropdownName** ID on the corresponding **UL** tag.

Demo
----

[](#demo)

You can open the **index.php** file under the **demo** directory to see a sample.

**Note:** The demo assumes Zend Framework is in your PHP include path.

Requirements
------------

[](#requirements)

- Zend Framework
- Twitter Bootstrap
- PHP 5.3

Questions / Comments?
---------------------

[](#questions--comments)

Send me an e-mail. If my code helps you out in your project, I'd love to hear about it.

Bugs / Improvements
-------------------

[](#bugs--improvements)

If you spot any bugs or have an idea for an improvement, please create an issue for it, or feel free to write the fix/improvement yourself and send a pull request. I'd appreciate if any contributions also included tests.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a45a3ba4599ef0f35205ae1ebb3b16c8daaf77c276053f2f8f6c53e5b094a8?d=identicon)[insee](/maintainers/insee)

---

Top Contributors

[![michaelmoussa](https://avatars.githubusercontent.com/u/183833?v=4)](https://github.com/michaelmoussa "michaelmoussa (44 commits)")[![kdubuc](https://avatars.githubusercontent.com/u/895661?v=4)](https://github.com/kdubuc "kdubuc (2 commits)")[![webermax](https://avatars.githubusercontent.com/u/169897?v=4)](https://github.com/webermax "webermax (2 commits)")[![yeroon](https://avatars.githubusercontent.com/u/567230?v=4)](https://github.com/yeroon "yeroon (1 commits)")

### Embed Badge

![Health badge](/badges/mmoussa-zf1-navigation-view-helper-bootstrap/health.svg)

```
[![Health](https://phpackages.com/badges/mmoussa-zf1-navigation-view-helper-bootstrap/health.svg)](https://phpackages.com/packages/mmoussa-zf1-navigation-view-helper-bootstrap)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
