How to avoid the redundant code, is it possible to write that code write in one function and we have to call other functions, please help me out

2010-04-21 Thread Narendra Padala
Hi all i am new to cake php please help me My problem is: common code for all the controller methods and other controller methods also --common code start--- if(!isset($intCurrentMenu)){ $intCurrentMenu = -1; //

Re: How to avoid the redundant code, is it possible to write that code write in one function and we have to call other functions, please help me out

2010-04-21 Thread Zaky Katalan-Ezra
If I understood your problem currently. Create an element for the menu. Pass arguments to the element in order to decide which menu items to render. You can consider splitting the menu to items with logic and static items, then you will be able to cache the static items menu. Check out the new