Tree and Acl behaviours...

2008-01-07 Thread NilsR

Hi folks,

I have a problem with my Tree and Acl behaviors. I have the model Site
which acts as a Tree and Acl. Everything works fine, Acos are created
and the Site is stored inside an MPTT. Yet, what is disturbing me is,
that the Acos arent stored in a tree.

Lets assume I have the Site tree:
Root
- Site A
- - Site B
- - Site C
- - - Site E
- Site D

My Acos will be like that:
- group.Sites
- - Site A
- - Site B
- - Site C
- - Site D
- - Site E

But i want and certainly need the Acos just like the Site tree ... I
hope you get my point.

Greetings, NilsR

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Tree and Acl behaviours...

2008-01-07 Thread NilsR



On 7 Jan., 10:29, AD7six [EMAIL PROTECTED] wrote:
 On Jan 7, 9:51 am, NilsR [EMAIL PROTECTED] wrote:



  Hi folks,

  I have a problem with my Tree and Acl behaviors. I have the model Site
  which acts as a Tree and Acl. Everything works fine, Acos are created
  and the Site is stored inside an MPTT. Yet, what is disturbing me is,
  that the Acos arent stored in a tree.

  Lets assume I have the Site tree:
  Root
  - Site A
  - - Site B
  - - Site C
  - - - Site E
  - Site D

  My Acos will be like that:
  - group.Sites
  - - Site A
  - - Site B
  - - Site C
  - - Site D
  - - Site E

  But i want and certainly need the Acos just like the Site tree ... I
  hope you get my point.

  Greetings, NilsR

 Have you defined a method named parentNode in your Site model? It
 isn't returning the pk value of the parent Site node.

 hth,

 AD
 Ref:https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/beh...

Well I have defined such a method. I worked with an article in the
Bakery that told me to define it this way:

/**
 * Returns the parent Alias for current
 */
function parentNode()
{
return $this-name;
}

I can imagine that the solutitions lies within this function but i
dont quite know how to define it.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---