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

Search Discussions

  • Tilen Majerle at Jun 19, 2012 at 9:59 am
    you need to activate plugin

    CakePlugin::load('Utils');
    --
    Lep pozdrav, Tilen Majerle
    http://majerle.eu



    2012/6/19 Jeremy Burns <jeremyburns@classoutfit.com>
    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+unsubscribe@googlegroups.com 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
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Jeremy Burns | Class Outfit at Jun 19, 2012 at 2:53 pm
    Yup - all plugins are loaded in bootstrap...

    Jeremy Burns
    Class Outfit

    http://www.classoutfit.com
    On 19 Jun 2012, at 10:59:11, Tilen Majerle wrote:

    you need to activate plugin

    CakePlugin::load('Utils');
    --
    Lep pozdrav, Tilen Majerle
    http://majerle.eu



    2012/6/19 Jeremy Burns <jeremyburns@classoutfit.com>
    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+unsubscribe@googlegroups.com 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
    cake-php+unsubscribe@googlegroups.com 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
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Steve Found at Jun 19, 2012 at 3:04 pm

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcake-php @
categoriesphp
postedJun 19, '12 at 8:49a
activeJun 19, '12 at 3:04p
posts4
users3
websitecakephp.org
irc#cakephp

People

Translate

site design / logo © 2022 Grokbase