Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.44 KB

3.Navigation.md

File metadata and controls

26 lines (20 loc) · 1.44 KB

Navigation

ZfcAdmin allows a dedicated navigation structure for the admin interface. By default, ZfcAdmin initiates a Twitter Bootstrap layout with on top the main admin navigation. These admin buttons are customizable.

Add a page

The admin structure requires at least a label for the navigation element and a route or url parameter for the link to be created. The route will use the url() view helper to construct a link. It is recommended to use routes in your child pages of ZfcAdmin and therefore it is straightforward to use the route parameter in the navigation configuration.

In the following example, there is a navigation element called "My Module" and points to zfcadmin/foo/bar as a route. This page is configured as follows:

'navigation' => array(
    'admin' => array(
        'my-module' => array(
            'label' => 'My Module',
            'route' => 'zfcadmin/foo/bar',
        ),
    ),
),

The navigation in ZfcAdmin uses Zend\Navigation and more information about the configuration of this component is located in the Zend Framework 2 reference guide.

Link to documentation pages

  1. Introduction
  2. Routes
  3. Navigation
  4. Authorization
  5. Views & Layout