使用数据库的zend导航

时间:2010-05-24 09:39:57

标签: php xml database zend-framework

我们如何为Zend_Navigation创建容器而不是使用数据库表的xml文件?

感谢

1 个答案:

答案 0 :(得分:1)

使用列{action,controller,ative,privalege ...等)创建表

然后

$rows = $db->fetchAll();
$config = Zend_config($rows);
$navigation = new Zend_Navigation($config); or new Zend_Navigation($rows);

为什么不使用它 a)数据库很慢 b)分层导航会很乱(你需要创建更多表格的一对多关系)