Hi Bingo, I would say at the very least it is bad practice to 'pass' a variable to the view by setting it on the controller.
You are not in any way restricted to using the name "data" for the variable you are setting, and you can set as many variables as you like. The set method is not setting a field on the controller, it adds to an array of variables to be passed to the view (look it up in the api). With that in mind, consider what would happen if you wanted to pass a variable a) with the same name as a component/model, which your controller code refers to in later execution (either in the same method or in the after* methods). OR b) with the same name as an exsiting field, which cake uses in later execution (e.g. try 'passing' a variable named view*). Following the way cake is designed to work will work, whereas bucking the system won't ;) HTH, Cheers, AD7six *Deduced, not tested. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
