Re: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-09 Thread barricades
Hey, that worked perfectly, thanks for the help :) On May 8, 9:27 pm, dreamingmind dreamingmin...@gmail.com wrote: Barricades, I think your concern about the beforeSave/afterSave issues are red herrings. Since the first line of your code is:  if ($this-Campaign-save($this-data)) {  ... both

Re: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-08 Thread barricades
Thanks for the reply :) The find after the save isn't returning what I want it to. In fact I'm not sure it's returning anything at all. Baring in mind I'm a total newbie (not even that much of a php'er either yet) what I want it simply somehow (what I've done is just my best guess - I've no idea

Re: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-08 Thread dreamingmind
Barricades, I think your concern about the beforeSave/afterSave issues are red herrings. Since the first line of your code is: if ($this-Campaign-save($this-data)) { ... both the before and after are finished. And you are only getting inside the 'if' statement when the save was successful. Of

Re: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-08 Thread BAIMA
$this-redirect(array('action' = 'view', 'id' = $slug)); hth... Claudio On 7 maio, 13:22, barricades davow...@googlemail.com wrote: Hi, I'm new so please don't shout at me for the stupid question but... When I save a record I want to redirect straight to the record I just created. The

newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-07 Thread barricades
Hi, I'm new so please don't shout at me for the stupid question but... When I save a record I want to redirect straight to the record I just created. The record which I have just created uses sluggable behaviour to create a slug in a beforeSave, so I can't just use $this- data['Campaign]['slug']

Re: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-07 Thread dreamingmind
Barricades, You don't really say WHERE the process seems to break down. The find after the save seems suspicious to me. Is that returning the proper slug to pass along to your view function? It looks like $slug will end up holding the returned data array rather than the returned string from the