Friday, September 3, 2010

AW: Undefined variable in view

And how about
var_dump($categories);
In the view?

Anja

-----Ursprüngliche Nachricht-----
Von: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] Im Auftrag von Richard
Gesendet: Freitag, 3. September 2010 09:25
An: CakePHP
Betreff: Re: Undefined variable in view

Hello Milos, thanks for you reply! If I define the variable in the controller as follows it states again that it's undefined in the view.

$this->set('categories', 'TestValue');

When I echo the variable in the controller everything looks alright:
var_dump($this->viewVars['categories']);

However it does not pass all of the viewVars for some reason to the view.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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
cake-php+at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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: