That was the first thing I changed--the problem turned out to be that I
wasn't enabling the module in bootstrap.php. Whoops!
Thanks,
Ben
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and hel
Make sure your components extend Component and not Object.
On Wed, Aug 24, 2011 at 6:48 AM, Ben McClure wrote:
> Hmm... actually I guess it is called but I have some sort of problem with
> one of my components that was preventing AppController from being used
> apparently (although no errors wer
Hmm... actually I guess it is called but I have some sort of problem with
one of my components that was preventing AppController from being used
apparently (although no errors were output). I will try disabling my custom
components and troubleshooting them one by one to see which one's doing it.
I'm having a hard time getting CakePHP 2.0 to use my AppController.
It's located in app/Controller/AppController.php
It defines components and helpers (which do not actually get defined) and
has a beforeFilter with a die() statement which never gets called.
Is that not the right place for CakeP
As Luke already pointed out, to prepare any kind of variable / data
for your views, you need to use the Controller::set() method.
Declaring a variable is not enough because it is only a local var
then, isn't it? Besides, if you view could see every single variable
from your controller, that would
Hi,
I am very new to cakePHP aswell, but I just tried something out which
seems to work. In the beforeFilter of the AppController, I added the
variable the following way:
$this->set('admin', false);
I can now access my $admin in the view without a problem. But as I
said I am very new to cakePHP
Hello,
I want to create a variable and initialize it in say AppController in
beforeFilter() and use the variable in the view (ctp file). I created a
variable $admin = false and tried to use it in view and I get error saying
$admin is undeclared variable. Is there any other way of doing thi