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
This part is the follow-up on what we have seen in CakePHP Basics Tutorial – Part 4.
Let me know if you enjoyed it!