On 19/06/12 09:49, Jeremy Burns wrote:
I'm just breaking my way into CakePHP 2. I'm trying to attach the SluggableBehavior from the CakeDC Utils Plugin to a model and am really struggling to find any decent resource that outlines the steps to do this. The official documentation on the usage of plugins, and specifically the usage of the CakeDC Utils Plugin is very thin and is therefore of very little use.

I've tried putting both of the following at the top of my model:

App::uses('SluggableBehavior', 'Utils.Behavior');
App::uses('SluggableBehavior', 'Utils/Behavior');

and I've set my $actsAs as follows:

var $actsAs = array('Utils.Sluggable');

but no joy. I'm on Cake 2.1.3 and my table already has both "name" and "slug" fields in place.

What am I doing wrong?
--
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Do you need the App::uses() call ?

If you've loaded the Utils plugin in bootstrap.php, I think the $actsAs = array('Utils.Sluggable'); should know where to look as you are using the plugin syntax.

--
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to