I'm a total beginner to CakePHP, and I'm trying to build a pretty basic website here that has a menu + some UI stuff like a footer that will persist through all the pages.
The trouble that I'm having right now is that in my controller, I have several different functions corresponding to the website's menu options that grabs data from database, but obviously I wouldn't want to create the same number of views since every page has the exact same setup.
So my question is what's the standard or best practice to achieve this? I read up on elements and am still kinda confused as to how this would be done; how would I keep track of which page is the user currently browsing? And if they click on a menu option, how would it be coded so it takes them from "blah.com/home" to "blah.com/contact"?
I know my question is kinda long and noobish but I'd really appreciate it if I could get some help in beginning CakePHP.
For functions corresponding to the website's menu options that grabs data from database, put these in beforefilter() of the App Controller and use $this->set to set variables and make element for menu which you can call in your layout. You can set the layout in your controllers like var $layout=''.