/ Published in: PHP

I needed to create several pages that didn't use any models and contained static data inside the default layout. My first thought was to create a controller for these pages and define an action for each static page I needed. However, this solution seemed tedious and would make it difficult to quickly add new pages. Enter the pages controller - simply create a view inside the views/pages/ folder and it'll automatically be rendered in /pages. For example, if I created /views/pages/matt.thtml it would be accessible via http://www.example.com/pages/matt
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//No Source, check comments
URL: http://www.avatarfinancial.com/pages/cake
Comments
