If you don't want to hard code them in your helper, then you will need another database table for your smileys. And a model.
Now you can get/set the database data just like any other model, through $this->Smiley->find() and $this->Smiley->save(). To get a list you might want to use $this->Smiley->generateList(). Now, how does Smiley relate to other models? I would have guessed that the HTML code for a smiley is to be added to a textarea (ie in your GuestBook post?) but after this point there is no dynamic relationship. In which case there are no associations. Or perhaps a single Smiley has to be chosen for the Guestbook post icon - in which case you want a GuestBook belongsTo Smiley association (with GuestBook.smiley_id). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
