Hi guys,

I'm working on this problem for about two hours already and just can't
find a solution.
Hope you can help!

I've set up a custom beforeRender() function in my AppController that
is supposed to
simply get a variable from a custom helper called LanguageHelper. Of
course the
helper is included via $helpers and I could use it in the view with no
problem.

But that's not what I want. I need to call the helper in my
AppController.
Please have a look at the code:

class AppController extends Controller
{
    var $helpers = array('Html', 'Javascript', 'Form', 'Ajax',
'Modul', 'Language');

    function beforeRender()
    {
        $test = $this->Language->getPageTitle();
        $this->set('test', $test);
    }
}

class LanguageHelper extends AppHelper
{
    public function getPageTitle()
    {
        return 'hello';
    }
}

I simplified things here. Does anyone know, why $test does not say
"hello"?
Thanks in advance!

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