Views

Views

The view layer of your web application is what your users see and interact with. Most of the time you will be serving XHTML to your web and iPhone users, but you can also deliver .CSV or even straight XML like a RSS feed.

ModelBaker generates all the views for you as template files. These files can be edited in your favorite text editor. These files have the .CTP (CakePHP Template) extension and contain all the presentation logic needed to render a XHTML view to your audience.

View files are stored in /app/views/, in a folder named after the controller that uses the files, and named after the view it corresponds to. For example, The view() action of the Products controller would normally be found in /app/views/products/view.ctp.

Helpers

Helpers are utility objects that help out with the presentation logic of the view layer. They can be shared among layouts, views and elements. You can use the CakePHP's built in helpers, extend them or you can create your own helpers. ModelBaker currently ships with the Ajax, Cache, Form, HTML, Javascript, Js, Number, Paginator, RSS, Session, Text, Time and XML helper objects.