Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Adding pages

Adding pages to a container can be done with the methods addPage(), addPages(), or setPages(). See examples below for explanation.

Example 635. Adding pages to a container

// create container
$container = new Zend_Navigation();

// add page by giving a page instance
'uri' => '',

// add page by giving an array
'uri' => '',

// add page by giving a config object
$container->addPage(new Zend_Config(array(
'uri' => '',

$pages = array(
'label'  => 'Save',
'action' => 'save',
'label'  => 'Delete',
'action' => 'delete',

// add two pages

// add container
$container->addPages(new Zend_Navigation(array(
'label'  => 'Move up',
'action' => 'up',
'label'  => 'Move down',
'action' => 'down',

// remove existing pages and add the given pages

Zend Framework