Zend_Navigation extends Zend_Navigation_Container. The findOneBy(), findAllBy(), and findBy() functions all search for pages recursively, but removePage() does not. This means that $navigation->removePage($navigation->findOneBy('id', 'page_10')); will work ONLY if page_10 is a root-level navigation node. Has anyone else encountered this and found a work-around?
I have found my own solutions and accepted one of them as how I have implemented it. I will select a solution from someone else if it’s better than mine.
Extend
Zend_NavigationandZend_Navigation_Containerto recursively remove pages.Create
My_Navigation_Containerthat extendsZend_Navigation_Container:Make a copy of
Zend_Navigationthat extendsMy_Navigation_Container: