CakePHP Basics Tutorial – Part 5


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

  1. Explain layouts
  2. Create 2 different layouts, one for regular users and one for the admin
  3. Explain elements
  4. 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!


%d bloggers like this: