On 7/12/07, Baz <[EMAIL PROTECTED]> wrote: > I'm new to Cake too, but this is one I believe I can answer. > > As with many things, there is no right/wrong answer, but here's what I think > would be best. > > Most logic should be kept in the Controller and just a data dump in the > view. So what you could do is populate your $this-data with the path for the > avatar and in your view, just display whatever dump an image tag regardless. > > Of course you could just as easily check the data in the view before you > display with an "if", but convention would lean towards the former method.
Since I'm a self-promoting egomaniac you should check out this link as well: http://www.littlehart.net/atthekeyboard/2007/04/27/fat-models-skinny-controllers/ -- Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
