I am creating a simple website in cakephp.
I have kept header and footer in “element” but my problem is that menu of header is coming from database and it will not be available until I call a function.
I want as soon as controller is called function of menu should be called by own.
In your AppController add this:
Then, in the view, the menu will be accessible by calling
echo $menu['yourModel']['menu'];