name); $registry = ClassRegistry::getInstance(); ?>
$value ) { echo "
".$value['prompt']."
"; if( isset( $value['foreignKey'] ) ) { $otherModelObject = $registry->getObject($value['model']); $displayField = $otherModelObject->getDisplayField(); $displayText = $data[$value['model']][ $displayField ]; echo "
".$html->linkTo($displayText, '/'.Inflector::underscore($value['controller']).'/show/'.$data[$modelName][ $field ] )."
"; } else { // this is just a plain old field. if( !empty($data[$modelName][$field]) ) { echo "
".$data[$modelName][$field]."
"; } else { echo "
 
"; } } } ?>
getObject($modelName); foreach ($objModel->_oneToOne as $relation) { list($table, $field, $value) = $relation; $otherModelName = Inflector::singularize($table); echo "