我有一些麻煩讓一個定製的痕跡: 我我layout.phtml我有:Zend框架:用麪包與部分
$container = new Zend_Navigation();
$this->navigation($container);
$container->addPage(
array(
'label' => 'Dashboard',
'module' => 'default',
'controller' => 'dashboard',
'action' => 'index',
'pages' =>
array(
array(
'label' => 'Create Order',
'module' => 'default',
'controller' => 'createorder',
'action' => 'index'
),
array(
'label' => 'Query',
'module' => 'default',
'controller' => 'query',
'action' => 'index',
'pages' => array(
array(
'label' => 'View Order',
'module' => 'default',
'controller' => 'order',
'action' => 'vieworder'
)
)
),
array(
'label' => 'Administration',
'module' => 'default',
'controller' => 'admin',
'action' => 'index',
'pages' =>
array(
array(
'label' => 'News and Announcements',
'module' => 'default',
'controller' => 'admin',
'action' => 'addnews',
'pages' => array(
array(
'label' => 'Edit News and Announcements',
'module' => 'default',
'controller' => 'admin',
'action' => 'editnews'
)
)
)
)
)
)
)
);
的下一行是:
echo $this->navigation()->breadcrumbs()->setPartial(array('BreadCrumb.phtml','default'));
麪包屑。 phtml被稱爲很好,但我不知道如何在我的BreadCrumb.phtml中創建ul-li菜單。我如何獲得我實際上的導航? 在此先感謝您的幫助。 Andrea
感謝你的回覆,將進行測試很快,給你一個反饋...... – cwhisperer 2012-01-18 15:02:30
沒問題,我提高了一點點我的代碼,使其更工作,如果有什麼好讓我知道! – Liyali 2012-04-04 04:53:32
這是一個godd渲染麪包屑的例子@Liyali!你在哪裏找到它?這一個應該被添加到官方文檔的例子 - 目前的是「窮人」:http://framework.zend.com/manual/2.3/en/modules/zend.navigation.view.helper.breadcrumbs.html#rendering -using-a-view-script – webDEVILopers 2014-06-18 09:10:07