I am pretty sure I have something in one of my apps setting variables in app_controller and readin the info in the default template.  I will double check.

What I am doing for login info though is setting it in the session and then checking for it in the default template.

So you can always set a variable in the session and then check for it in your layouts.  This would bypass the need to use the set() method.

On 8/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I understand why you would want to write it in the app_controler (so
that all controllers might inherit from this).  The problem is, there
doesn't seem to be a way to declare variables outside of functions.
And, as you probably are finding out, when a application controller
inherits from the app_controller, the function declared in
app_controller (with the variable "foo", let's say) would be
overwritten.  Good question, but not sure how to make it work or
achieve "visibility".



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