Moreover, in order this to work, I had to modify cake/libs/controller/
scaffold.php (/* SVN FILE: $Id: scaffold.php 5422 2007-07-09 05:23:06Z
phpnut $ */)
ADDED LINE 507&508 :
} elseif (file_exists($path . DS . 'scaffolds' . DS . $this->subDir .
$type . $scaffoldAction . '.thtml')) {
return $path . DS . 'scaffolds' . DS . $this->subDir . $type .
$scaffoldAction . '.thtml';
I'm newbie in CakePHP, but I guess the "$this->viewPath" in the
__getViewFileName function. If not, thanks in advance to correct
this way, you can add your scaffold views in :
/app/views/YOURCONTROLLER/scaffold.index.thtml or /app/views/
YOURCONTROLLER/scaffolds/scaffold.index.thtml
or
/app/views/scafflods/scaffold.index.thtml
On 15 août, 10:15, "Tang Jianyu(唐剑宇)" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I found that there is an error in the cakephp manual aboutscaffold:
>
> http://manual.cakephp.org/chapter/scaffolding
>
> -------------------------------
>
> Custom scaffolding views for a PostsController should be placed like so:
>
> /app/views/posts/scaffold/index.scaffold.thtml
> /app/views/posts/scaffold/show.scaffold.thtml
> /app/views/posts/scaffold/edit.scaffold.thtml
> /app/views/posts/scaffold/new.scaffold.thtml
>
> ----------------------------------
>
> But actually, the views are should to be named as
> /app/views/posts/scaffold.index.thtml. And the code was placed in
> cake/libs/controller/scaffold.php.
> Please have a check at this and correct the document, thanks!
>
> Regards.
>
> Tang Jianyu
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---