Today I’ll show you how you can use cakePHP layout files and elements. This way you can easily create different layouts for your pages and with elements you can write efficient code instead of copy/pasting the same code over and over again.
In this tutorial I’ll be covering
- Explain layouts
- Create 2 different layouts, one for regular users and one for the admin
- Explain elements
- Create an element and pass data to it
Let me know if you enjoyed it! Happy coding!