Well, I *think* that's how I started out, but I'm not all clear on how the different models, controllers and views communicate with eachother.
What I've done so far is this: -Model- * Guestbook (This collects all data from the guestbooks table making it available to the application) * Avatar (This collects all data from the avatar table making it available to the application BUT it's also combined with the Guestbook- model because they share information (key id's)) -Controller- * Guestbook (Assigns the views I'd like to use (taken from the Blog tutorial; index, add, edit, delete)) -Views- * Index * Add * Edit * Delete Now, I read a bit about combining data between tables and it sorted itself out with the help of $belongsTo and $hasMany. This means that the avatar_id's in Guestbook is combined and replaced by info from the Avatar table. This works right out of the box on the Index page. But I just can't get my head around adding a new model and combine it without using for example $belongsTo and $hasMany, since it's not really going to be used on every subsequent post stored in the Guestbook table. I'm trying to implement my Smileys array function into the Edit and Add views but I'm getting a bit confused as to what I should add and where. I'm thinking it should be a helper (it has alot to do with the presentation) but somehow I need to connect it with a Model or a Controller to be able to get to the table data. I think? :p Again, thanks for yout input, much appreciated! Regards DrLaban On Jul 6, 12:50 pm, Sergei <[EMAIL PROTECTED]> wrote: > So what's the problem? Make a function in a model that extracts smiley > data, and set it to view variable in your controller action. > > Then make a helper something like: > > $myhelper->smily($smilydata) > > or better, do it with element: > > $this->renderElement("smile",array('data'=>$smileydata)) > > I would choose an element for this. > > On 6 ???, 19:16, DrLaban <[EMAIL PROTECTED]> wrote: > > > I managed to figure out a bit about helpers and the way they work but > > I'm still a bit lost getting to know the workings of Cake. > > Now, seeing that a helper was great for bbCode parsing I'm now trying > > to figure out what the best way to handle an array of smileys is. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---