@AD7Six, I'm still not clued up enough on behaviours to start creating
my own.  It'd help if the cakephp book had some information on
creating them and an example http://book.cakephp.org/view/88/behaviors

Also the content being saved shouldn't ever be edited so I figured
using Geshi before saving it would lower the overhead of doing it
every time it's displayed.  Other content which can be edited uses
Mark Story's Geshi Helper ;)

@James K & Joe, I'm already using the beforeSave but didn't want to
duplicate code starting up and configuring HTMLPurifier and Geshi.
I'm after a better place to put that code to then call from beforeSave/
Validate :)

On Jul 10, 10:35 pm, James K <[EMAIL PROTECTED]> wrote:
> I was going to suggest this as well. The beforeSave function fires
> before save/validation and you can access $this->data and modify it as
> you see fit. As long as you return true, the script will continue none
> the wiser.
>
> - James
>
> On Jul 10, 1:20 pm, Joe <[EMAIL PROTECTED]> wrote:
>
> > You could use beforeSave
>
> > On Jul 10, 9:30 am, CrazyDave <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I've been wanting to include some extra functionality in a model but
> > > wanted to know the best CakePHP way of going about things.
>
> > > For example we've got controllers and components, then views and
> > > helpers.
>
> > > I want my model to "behave" as normal but say use something like a
> > > helper to process the text before saving / validation.  I did think
> > > about processing certain content in the model with Geshi but could see
> > > no easy way of doing so with adding it in all the models required or
> > > the appmodel.
>
> > > Should behaviours be used for this sort of thing?  As it doesn't quite
> > > seem right to me at the moment.
>
> > > Thanks for any help,
> > > Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to