Action Methods

Each page has a coinciding action (function) associated with it in the controller page. So if you access ”/user/listing/” you need a function called

function listing(){
} 

associated with it. The function in the controller can be used to generate data for the view to display.

To make a collection of all the users in your database, write

$this->users =& $this->Users->find('all');

To display this collection in the view (/user/listing.tpl)

{loop users}
       <?php  echo  $users->get("name") ?>
{end}
 
action-methods.txt · Last modified: 2009/01/23 13:45 by 128.39.191.217
 

The Akelos Framework was created by Bermi Ferrer and other contributors.
Potions of the code and documentation have been ported from Ruby on Rails.

The Akelos Framework is released under the LGPL license.

"Akelos", "Akelos Framework", and the Akelos logo are trademarks of Bermi Labs All rights reserved.

Wiki driven by DokuWiki