我正在使用zend framework 1.12版本进行开发,因为我在navigation.ini文件中编码了主导航菜单栏(侧面菜单)。我有两种类型的登录(管理员,用户)。仅限管理员,我必须显示一些额外的菜单。对于用户也是如此,从管理页面看不到。对于管理员我完成了。但是对于用户如何在navigation.ini中制作菜单栏,应该为admin隐藏它。 我的navigation.ini代码如下所示。
[nav]
overview.uri = /overview
overview.label = "Dashboard"
overview.class = "nav_dashboard"
overview.resource = "overview"
admin.uri = /admin/user
admin.label = "User Manager"
admin.id = "nav_admin-index"
admin.resource = "admin"
admin.pages.user.uri = /admin/user
admin.pages.user.label = "Show Users"
admin.pages.user.id = "nav_admin-index"
admin.pages.user.resource = "admin"
admin.pages.import.uri = /overview/index/import
admin.pages.import.label = "Import Employees"
admin.pages.import.id = "nav_admin-index"
admin.pages.import.resource = "admin"
admin.pages.add.uri = /admin/user/add
admin.pages.add.label = "Add User"
admin.pages.add.id = "nav_admin-index"
admin.pages.add.resource = "admin"
;donateitem.uri = /donateitem
;donateitem.label = "Donate (Kind)"
;donateitem.id = "nav_donateitem-index"
;donateitem.resource = "donateitem"
;donateitem.pages.user.uri = /donateitem/index/
;donateitem.pages.user.label = "Show Items"
;donateitem.pages.user.id = "nav_donateitem-index"
;donateitem.pages.user.resource = "donateitem"
;donateitem.pages.add.uri = /donateitem/index/add
;donateitem.pages.add.label = "Donate Item"
;donateitem.pages.add.id = "nav_donateitem-index"
;donateitem.pages.add.resource = "donateitem"
donatecash.uri = /donatecash
donatecash.label = "Donate (Cash / In Kind)"
donatecash.id = "nav_donatecash-index"
donatecash.resource = "donatecash"
donatecash.pages.user.uri = /donatecash/index/
donatecash.pages.user.label = "Show Cash Donations"
donatecash.pages.user.id = "nav_donatecash-index"
donatecash.pages.user.resource = "donatecash"
donatecash.pages.item.uri = /donatecash/index/itemindex
donatecash.pages.item.label = "Show In Kind Donations"
donatecash.pages.item.id = "nav_donateitem-index"
donatecash.pages.item.resource = "donateitem"
donatecash.pages.add.uri = /donatecash/index/add
donatecash.pages.add.label = "Donate (Cash / In Kind)"
donatecash.pages.add.id = "nav_donatecash-index"
donatecash.pages.add.resource = "donatecash"
sellproduct.uri = /sellproduct
sellproduct.label = "Sell Prodcuts"
sellproduct.id = "nav_sellproduct-index"
sellproduct.resource = "sellproduct"
sellproduct.pages.user.uri = /sellproduct/index/
sellproduct.pages.user.label = "Show Products"
sellproduct.pages.user.id = "nav_sellproduct-index"
sellproduct.pages.user.resource = "sellproduct"
sellproduct.pages.add.uri = /sellproduct/index/add
sellproduct.pages.add.label = "Add Product"
sellproduct.pages.add.id = "nav_sellproduct-index"
sellproduct.pages.add.resource = "sellproduct"
buyproduct.uri = /buyproduct
buyproduct.label = "Buy Prodcuts"
buyproduct.id = "nav_buyproduct-index"
buyproduct.resource = "buyproduct"
buyproduct.pages.user.uri = /buyproduct/index/
buyproduct.pages.user.label = "Show Products"
buyproduct.pages.user.id = "nav_buyproduct-index"
buyproduct.pages.user.resource = "buyproduct"
buyproduct.pages.add.uri = /buyproduct/index/bought
buyproduct.pages.add.label = "Bought Products"
buyproduct.pages.add.id = "nav_bought-index"
buyproduct.pages.add.resource = "buyproduct"
report.uri = /admin/report
report.label = "Report"
report.id = "nav_admin-index"
report.resource = "admin"
report.pages.user.uri = /admin/report/report
report.pages.user.label = "Donate Cash Report"
report.pages.user.id = "nav_admin-index"
report.pages.user.resource = "admin"
report.pages.kind.uri = /admin/report/kind
report.pages.kind.label = "Donate Kind Report"
report.pages.kind.id = "nav_admin-index"
report.pages.kind.resource = "admin"
report.pages.sellproduct.uri = /admin/report/sellproduct
report.pages.sellproduct.label = "Buy & Sell Product Report"
report.pages.sellproduct.id = "nav_admin-index"
report.pages.sellproduct.resource = "admin"
在此捐赠项目中,捐赠现金仅对用户可见。任何人都可以告诉如何做到这一点。我是zend框架中的新手,并且不知道如何在导航中执行此操作,回复很明显。提前致谢