Well no, you wouldn't need to make a Model etc... There are a number of ways, each with their own costs/benefits: 1. Copy the pages_controller.php out of the core and into your app and edit it. Cake will look for your controller first, then if it can't find it use the core version by default. 2. put var $helpers = array('Javascript'); in your AppController. this way ALL controller will inherit it and therefore all views will have it. 3. Build your own Pages-like controller. simply put var $uses = array(); to have it skip looking for a Model.
On Feb 13, 7:06 am, smoove <[EMAIL PROTECTED]> wrote: > Hey everybody, > > I have a slight 'issue' with CakePHP, which I will explain now: > A website I am building has static pages, but I need to include the > javascript helper so I can link to the javascript files which are > needed for the application. > What I am doing so far, is using the default pages model/controller, > by just leaving it away. This way, if I callwww.example.com/pages/book, > it will look for the view file "/app/views/pages/book.thtml". Great! > That's really all I want. > However, the javascript helper is not included by default, so when I > try to use $javascript -> link, php throws an error. > In order to include the helper, I need to make a model, controller and > view, but this is not what I want! > > Is there any way to include the javascript helper without having to > make a model, controller and view? Perhaps by setting it as "include > by default"? > > I look forward to any reaction at all :) > > cheers, > chiel. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---