PHPackages                             ngen/zf2navigation - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ngen/zf2navigation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ngen/zf2navigation
==================

Dynamic Navigation System for Zend Framework 2

234PHP

Since Jan 27Pushed 11y ago1 watchersCompare

[ Source](https://github.com/nGen/Zf2Navigation)[ Packagist](https://packagist.org/packages/ngen/zf2navigation)[ RSS](/packages/ngen-zf2navigation/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Zf2Navigation
=============

[](#zf2navigation)

Dynamic Navigation System for Zend Framework 2.

Introduction
------------

[](#introduction)

The navigation component of Zend Framework 2 has a simple approach. It either uses config files with Array definition of menus or XML files with similar data to render or generate the menu. However, the most popular way in the web is to generate or get the menu items from db and manage them through a manageable interface. All popular CMS's like Wordpress, Joomla have this feature but building such menu with complex hierarchy is a huge performance load on any application. Zend Framework 2's Navigation component uses static definition of link for this very reasons.

Most of the solutions on the internet provide you with a way to get the list of menu menu at start-up but as I mentioned earlier it comes in the cost of huge performance load. This library however gives you the option to have a database managed Navigation System as well as remove the performance load by generating the navigation configuration file with a click of a button.

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

[](#requirements)

- [ZfcBase](https://github.com/ZF-Commons/ZfcBase) (latest master).
- [nGenZfc](https://github.com/nGen/Zfc) (latest master)
- \[nGenZf2Entity\] () (latest master)
- [TwbBundle](https://github.com/neilime/zf2-twb-bundle) (latest master)

Features
--------

[](#features)

- Create new navigation containers without having to create a Navigation Factory file every-time new menu should be created.
- Navigation Management system with various features to create new containers as "Navigation Menus" and add various pages or link on them dynamically.
- Three modes of every menu: Menu, Breadcrumbs and Site-map. You can choose to select which link to appear where as required.
- Create Navigation Page on simple mode providing directly only the link or go to advanced mode and add all sorts of technical details like route and its parameters, target, position etc.
- Management system of these menus and links with full functional CRUD features including enabling and disabling them.
- Mock-up configuration to directly embed the navigation system within the admin route. It is totally optional.
- Generates the Navigation Factory and Navigation Config for all the menu.
- Full functional DB tables that supports all properties of ZF2's NavigationPage Object.

Installation
------------

[](#installation)

### Main Setup

[](#main-setup)

#### With composer

[](#with-composer)

1. Add this project and [ZfcBase](https://github.com/ZF-Commons/ZfcBase) in your composer.json:

    ```
    "require": {
        "ngen/zf2navigation": "dev-master",
    }
    ```
2. Now tell composer to download ZfcUser by running the command:

    ```
    $ php composer.phar update
    ```

#### By cloning project

[](#by-cloning-project)

1. Install the [ZF2Navigation](https://github.com/nGen/Zf2Navigation) ZF2 module by cloning it into `./vendor/`.
2. Clone this project into your `./vendor/` directory.

### Post installation

[](#post-installation)

1. Enabling it in your `application.config.php`file.

    ```
