There is nothing magic about the sluggable behaviour; it just populates the 
slug field of the $this->data array on beforeSave() using Inflector. You could 
write your own version. I have made some amendments to it myself for a 
particular scenario - just step through the code and you'll see it's fairly 
intuitive.

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 19 Apr 2011, at 12:14, barricades wrote:

> I have a Campaign model and I want to create a slug for each new
> campaign. I can do this easily with sluggable behaviour which is
> awesome but I'd like the slug to be created from the first_name and
> last_name field in the users table.
> 
> How can I do this? I've seen it asked a couple of times online but
> never answered. Surely it's possible!?!
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to