Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between template and view in cake php

I am new to CakePHP 3.0. Previously I used CodeIgniter. In CakePHP 3.0 we have to create our HTML designs in src/Template rather than src/View.

My question is what is the difference between a View and Template?

like image 807
Shaunak Avatar asked Apr 26 '26 09:04

Shaunak


1 Answers

Since 3.0 the folders containing view files now go under src/Template instead of src/View. This was done to separate the view files from files containing php classes (eg. Helpers, View classes).

so basicly your html (.ctp files) go into src/Template and your .php files 'helping' your templates go into src/View

like image 78
Alex Stallen Avatar answered Apr 29 '26 03:04

Alex Stallen