PHPackages                             kdubuc/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. kdubuc/zf1-navigation-view-helper-bootstrap

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

kdubuc/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.

0684PHP

Since Apr 15Pushed 13y ago1 watchersCompare

[ Source](https://github.com/kdubuc/zf1-navigation-view-helper-bootstrap)[ Packagist](https://packagist.org/packages/kdubuc/zf1-navigation-view-helper-bootstrap)[ RSS](/packages/kdubuc-zf1-navigation-view-helper-bootstrap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

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. To activate a divider, just set the href to "divider". To activate a navheader, just set the href to "navheader" ans set the text with the label attribute.

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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.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/28f3584f827147e98199dbdd7fd524a17831006792f6c0fac136b5d591d0d6bf?d=identicon)[kdubuc](/maintainers/kdubuc)

---

Top Contributors

[![michaelmoussa](https://avatars.githubusercontent.com/u/183833?v=4)](https://github.com/michaelmoussa "michaelmoussa (25 commits)")[![kdubuc](https://avatars.githubusercontent.com/u/895661?v=4)](https://github.com/kdubuc "kdubuc (5 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/kdubuc-zf1-navigation-view-helper-bootstrap/health.svg)

```
[![Health](https://phpackages.com/badges/kdubuc-zf1-navigation-view-helper-bootstrap/health.svg)](https://phpackages.com/packages/kdubuc-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)
