Scaffold is wonderful....and cake is very flexible (gymnast :D) framework ;)
I suggest to exclude field with beforeRender (controller) + array_diff:
//example to exclude created & modified
function beforeRender(){
if ($this->action=='index'){
$this->viewVars['scaffoldFields']=array_diff($this->viewVars['scaffoldFields'],array('created','modified'));
}
return true;
}
//if you want custom scaffold views
1- copy default scaffold views: index, view,edit from
cake/libs/view/scaffolds/ to your app/views/<pluralName>/
2- rename index=>scaffold.index,view=>scaffold.view,edit=>scaffold.edit
3- edit scaffold views as you prefer.
/fiblan
On Tue, Sep 2, 2008 at 4:22 PM, hydra12 <[EMAIL PROTECTED]> wrote:
>
> The easiest way to do this is to bake your application and have bake
> create the default views for you. Then you can go in and edit those
> views any way you want. Otherwise, scaffolding is pretty much non-
> editable. I think you can edit the scaffold templates, but I don't
> know how to do that.
>
> On Sep 2, 4:02 am, "Ranjana Sriavastava" <[EMAIL PROTECTED]>
> wrote:
>> Hello
>>
>> I want remove some fields from scaffold views. which type that possible pls
>> help me.
>>
>> thanks
>>
>> Ranjana
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---