zend-navigation

zend_navigation and modules

丶灬走出姿态 提交于 2019-12-07 13:41:41
问题 I am developing an application at the moment with zend and I have seperated the app into modules. The default module is the main site where unlogged in users access and have free reign to look around. When you log in, depending on the user type you either go to module A or module B, which is controlled by simple ACLs. If you have access to Module A you can not access Module B and visa versa. Both user types can see the default module. Now I want to use Zend_Navigation to manage the entire

PHP RecursiveIteratorIterator: Determining first and last item at each branch level

。_饼干妹妹 提交于 2019-12-06 02:26:03
问题 I have extended Zend_View_Helper_Navigation_Menu , and it uses a RecursiveIteratorIterator to iterate over the menu tree. What I want to be able to determine is whether I am on the first or last item for a branch level in the tree. Here's an example of what I'm looking for: Nav 1 (first) Nav 1.1 (first & last) Nav 1.1.1 (first) Nav 1.1.2 Nav 1.1.3 (last) Nav 2 Nav 2.1 (first) Nav 2.2 (last) Nav 3 (last) Nav 3.1 (first) Nav 3.2 (last) Additional Information PHP Version 5.2.13 Solution Within

zend_navigation and modules

北慕城南 提交于 2019-12-06 01:41:26
I am developing an application at the moment with zend and I have seperated the app into modules. The default module is the main site where unlogged in users access and have free reign to look around. When you log in, depending on the user type you either go to module A or module B, which is controlled by simple ACLs. If you have access to Module A you can not access Module B and visa versa. Both user types can see the default module. Now I want to use Zend_Navigation to manage the entire applications navigation in all modules. I am not sure how to go about this, as all the examples that I

How do I add a class name to <li> from Zend Navigation XML

霸气de小男生 提交于 2019-12-05 23:48:27
Can someone please help me out, I'm totally stuck! I don't know how to add a class name to <li> tag in Zend navigation XML This is my XML <configdata> <nav> <home> <label>Home </label> <uri>/</uri> </home> <request> <label>Quotes </label> <uri>/quote</uri> </request> <work> <label>How It Works</label> <uri>/how-it-works</uri> </work> <information> <label>Informations </label> <uri>/informations</uri> </information> <directory> <class> last </class> <label>Directory </label> <uri>/directory</uri> </directory> </nav> </configdata> When I add <class>last</class> this is what i get: <li> <a class=

PHP RecursiveIteratorIterator: Determining first and last item at each branch level

北慕城南 提交于 2019-12-04 07:40:25
I have extended Zend_View_Helper_Navigation_Menu , and it uses a RecursiveIteratorIterator to iterate over the menu tree. What I want to be able to determine is whether I am on the first or last item for a branch level in the tree. Here's an example of what I'm looking for: Nav 1 (first) Nav 1.1 (first & last) Nav 1.1.1 (first) Nav 1.1.2 Nav 1.1.3 (last) Nav 2 Nav 2.1 (first) Nav 2.2 (last) Nav 3 (last) Nav 3.1 (first) Nav 3.2 (last) Additional Information PHP Version 5.2.13 Solution Within the foreach ($iterator as $page) loop two variables can be used to keep track of the depths, $depth and

Passing url parameters to Zend_Navigation using an XML-file

别来无恙 提交于 2019-12-01 11:07:36
问题 I am using Zend Framework 1.10.8. I want to create a breadcrumb section in my layout.phtml. There are some links in my menu that have dynamic url parameters like http://mydomain.com/editor/edit/id/42 I try to figure out how to pass id=XXX to Zend_Navigation, while XXX comes from the database and is different in every request. One solution I found so far is adding a property e.g. params_id to my xml declaration: in configs/navigation.xml <pages> <editor> <label>Editor</label> <controller

Zend Navigation and RBAC

扶醉桌前 提交于 2019-12-01 00:37:21
I am developing a ZF2 based site. I have a main navigation which stays same regardless of the visitor/user status. Need to add another component/nav, which will depend on the user's status and role. For a visitor the items will be Register Login EN (Actually a drop-down, with other available language) For a logged-in normal user, it will display Profile Logout EN (Language selector as mentioned above) And for some users with specific roles/permission there will be additional items I want to use RBAC, as ACL seems bloated, and also just to check if the current logged in user/role has additional

Zend Navigation and RBAC

China☆狼群 提交于 2019-11-30 19:05:08
问题 I am developing a ZF2 based site. I have a main navigation which stays same regardless of the visitor/user status. Need to add another component/nav, which will depend on the user's status and role. For a visitor the items will be Register Login EN (Actually a drop-down, with other available language) For a logged-in normal user, it will display Profile Logout EN (Language selector as mentioned above) And for some users with specific roles/permission there will be additional items I want to

ZF2 - Injecting pages to navigation before controller is called

蹲街弑〆低调 提交于 2019-11-28 09:48:12
问题 I'm creating a dynamic Application in which the content is added through a CMS. Inside the CMS, I'm setting a db entry which states what module to use for each content page. NodeId, ParentNodeId, Name_de, Name_en, ModuleName, foreignkey_ContentLinks, in this table entries look as follows: 6, 1, Veranstaltung-21-02-2013, Event-21-02-2013, Events, 682 The entire tree should end up in my navigation (and perfectly also in my routing). I do not want to add it in some controller, because my

How do I extend the Zend Navigation Menu View Helper?

流过昼夜 提交于 2019-11-26 14:51:18
问题 I need to change the output of Zend_View_Helper_Navigation_Menu . I've found the two functions that I'll need to modify, and I know how to make the changes I need. What I don't know is how to make the Navigation object use my view helper instead of the Zend one. Code snippet representing my class extension: // file /library/My/View/Helper/Navigation/Menu.php class My_View_Helper_Navigation_Menu extends Zend_View_Helper_Navigation_Menu { protected function _renderDeepestMenu(Zend_Navigation