Tuesday, November 24, 2015

Re: generateTreeList starting from an id

work for me


Vào 20:45:23 UTC+7 Thứ Sáu, ngày 16 tháng 3 năm 2012, gimmebucks đã viết:
What i always do is get the node lft and rght value.
then set conditions array('Model.lft >' => $node['lft'],'Model.rght <'
=> $node['rght'])
to include the node, substitute > with >= and < with <=

On Mar 16, 12:06 am, Ernesto <e.fanz...@gmail.com> wrote:
> i forgot to say i've already tried the "conditions" argument but the
> function will return just the first layer of results
>
> Il giorno giovedì 15 marzo 2012 16:49:30 UTC+1, Ernesto ha scritto:
>
>
>
> > Hi all.
>
> > i'm using TreeBehavior in one of my Models and everything is working ok.
>
> > just one question:
> > generateTreeList returns a list containing ALL the entries in the table.
>
> > i want the treeList just for the category with id = 20 and his childrens
>
> > how can i do?
>
> Il giorno giovedì 15 marzo 2012 16:49:30 UTC+1, Ernesto ha scritto:
>
>
>
>
>
>
>
>
>
> > Hi all.
>
> > i'm using TreeBehavior in one of my Models and everything is working ok.
>
> > just one question:
> > generateTreeList returns a list containing ALL the entries in the table.
>
> > i want the treeList just for the category with id = 20 and his childrens
>
> > how can i do?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: