a quick and dirty solution, add this 3 lines to the bake task in the model to push the fields (line 746):
$data['useDbConfig'] = $name->useDbConfig; $data['name'] = $name = $name->name; } else { $data['name'] = $name; } * $model=$this->_getModelObject($name); $fields = $model->schema(true); $data['fields']=array_keys($fields);* $defaults = array('associations' => array(), 'validate' => array(), 'primaryKey' => 'id', 'useTable' => null, 'useDbConfig' => 'default', 'displayField' => null); $data = array_merge($defaults, $data); El martes 13 de marzo de 2012 10:02:59 UTC+1, gavrielh escribió: > > I'm trying to iterate over model fields within a custom Bake template - I > can't seem to figure out what variables might be available that would allow > me to iterate over the fields within the model. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php