Hi,

I've read all the workarounds to get a default set of helpers in all
controllers (by overriding them in /app/app_controller.php), but I
can't seem to get the Javascript helper initialised at the stage I
want...?

Using the code below, I want to insert behaviour.js on every page,
inside the <head> tags, but I just get the $javascript not found
errors and $this->helpers returns just 'Html'. The Javascript helper
doesn't get added until the $content_for_layout is called further down
the page.

Any ideas on how I can get Javascript added by default on all .thtml
pages?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>

<?php
        echo $html->charsetTag('UTF-8');
        echo $html->css('default', 'stylesheet');
        echo $javascript->link('vendor.php?file=behaviour.js');
 ?>

<title><?php echo $title_for_layout; ?></title>

</head>


Thanks :)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to