It does depend on how much you want to do. If there really are fields
you don't care about at all, then you can do something like this in
your model....
class User extends AppModel
{
// Its always good practice to include this variable.
var $name = 'User';
var $hideFields=array("dontcare1","dontcare2");
//Determine if the field should be shown
function showField($fieldName){
foreach($this->hideFields as $field){
if ($field == $fieldName){
return false;
}
}
return true;
}
//Hide stuff... by overloading the table inspection
function loadInfo($clear = false) {
$results = parent::loadInfo($clear);
$index = 0;
foreach ($results->value as $value){
if (!$this->showField($value['name'])){
unset($results->value[$index]);
}
$index++;
}
return $results;
}
//Rest of your stuff
}
On Jul 25, 3:23 pm, rtanz <[EMAIL PROTECTED]> wrote:
> hi im still building my system using scaffolding, was wondering
> whether i could change the fields that are displayed by scaffolding.
> for example i would like to drop the display of the id field. I know
> that scaffolding is supposed to be used in the intial phases only but
> i am putting up something quickly for my client to review so i would
> like to keep things as flexible as possible to make changes easier to
> implement after the meeting with the client. whats the best thing for
> me to do?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---