I need to create a static pages along with other dynamic pages for my CakePHP site. Initially i have decided to go with a similar procedure as dynamic pages. But later i got the solution for Static pages that CakePHP provides a simple and easiest way to create Static pages. Follow the below steps to create static pages in CakePHP.
1) Go to views/pages directory
2) Create test.thtml file under pages folder
3) Access page by http://www.yoursite.com/pages/test
You don’t need to write any rotes rule to achieve this.
If you are in a situation to differentiate static pages into sub directory than follow the basic steps to create sub pages for static pages in CakePHP.
1) Go to views/pages directory
2) Create a sub folder(for e.g. sub1)
3) Create subtest.thtml file under sub1 folder
4) Access page by http://www.yoursite.com/pages/sub1/subtest
You are Done.