Wednesday, September 30, 2009

Re: javascript link in default.ctp

do i have to create it or to copy cake/libs/controller/
app_controller.php so that cakephp will read mine from now on?


On Sep 30, 4:41 pm, m lundvall <mrlundv...@gmail.com> wrote:
> You have to create "app_controller.php" in app/
>
> Don't mess with cake/ directory unless you know what you are doing.
>
> // lundvall
>
> On 30 Sep, 13:16, lorenx <lor...@gmail.com> wrote:
>
> > mmm,
> > i have just these two:
>
> > cake/libs/controller/app_controller.php
> > cake/console/libs/templates/skel/app_controller.php
>
> > On Sep 30, 11:41 am, "Richard@Home" <richardath...@gmail.com> wrote:
>
> > > AppController doesn't go in the cake/ folder, it goes in your app
> > > folder:
>
> > > /app/app_controller.php
>
> > > class AppController extends Controller {
>
> > >     var $helpers = array("Html", "Form", "Javascript");
>
> > > }
>
> > > On Sep 30, 9:17 am, lorenx <lor...@gmail.com> wrote:
>
> > > > m, ok...
> > > > i raised the issue just because the cookbook says "not to edit files
> > > > in cake/ folder"...
>
> > > > thanks.
>
> > > > On Sep 30, 2:12 am, brian <bally.z...@gmail.com> wrote:
>
> > > > > On Tue, Sep 29, 2009 at 5:07 PM, lorenx <lor...@gmail.com> wrote:
>
> > > > > > sure but...
> > > > > > is there a way to do it in the app/ area?
>
> > > > > Do you mean in individual controllers? Yes, but you'd have to add it
> > > > > to all of them, so there's not much point. Besides, if you then ran
> > > > > into a "missing controller" error or similar, you'd run into a fatal
> > > > > error because of the$javascript call in the layout.
>
> > > > > Short answer: Save yourself some grief and load it into AppController.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: