Yes, you can do that by having conditional code in the view and
setting the template:
$this->render('crudView');

and a mode in a view variable:
$this->set('mode','edit');

In general, you be better off following the accepted way, though, as
things can get terribly comfusing and complicated if you don't. You're
not saving paper or electricity by combining into one view. Keep it
simple and keep it clear.

On 15 June, 09:35, Mario Simaremare <[email protected]> wrote:
> dear all,
>
> i am very new with php and the cake. i used to play with java
> actually.
> i would ask you, if there is a way in the cake to create a single view
> file to view, add, and edit then reuse them.
> i mean to use the same view with different models. the views
> automatically detects the table columns and it's header then fill the
> cell with the thrown models data?
>
> thank you,
>
> regards,

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to