RosSoft wrote:
> the components haven't beforeFilter or helpers.
> Javascript helper must be declared in AppController if you use it global
That's how my AppController looks like.
<?php
class AppController extends Controller
{
    var $helpers = array('Html', 'Javascript');
    function checkSession()
    {
        // If the session info hasn't been set...
        if (!$this->Session->check('User'))
        {
            // Force the user to login
            $this->redirect('/users/login');
        }
    }
}
?>
But the Element still gives: Notice: Undefined variable: javascript
when I try to use this in the view: <?php echo
$javascript->link('dtree') ?>


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

Reply via email to