Overview
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
You can download the files for this tutorial over here.
This part is the follow-up on what we have seen in part 4 of my CakePHP basics serie!
Let me know if you enjoyed it! Happy coding!