Re: generateTreeList starting from an id

2015-11-24 Thread Lê Minh Thành
> > 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: >

Re: actAs "Tree" : generatetreelist error

2012-07-03 Thread Davor Ilic
goog to know thank you 2012/6/18 Ish > Had the same problem in cakephp 2.0 > > Later realized *generatetreelist* function got renamed to * > generateTreeList* > > On Thursday, January 27, 2011 9:44:58 PM UTC-5, raymond wrote: >> >> Hi. >> I have tried Tree be

Re: actAs "Tree" : generatetreelist error

2012-06-18 Thread Ish
Had the same problem in cakephp 2.0 Later realized *generatetreelist* function got renamed to *generateTreeList* On Thursday, January 27, 2011 9:44:58 PM UTC-5, raymond wrote: > > Hi. > I have tried Tree behavior just according to manual, but it reports > error following: >

Re: generateTreeList starting from an id

2012-03-16 Thread gimmebucks
: > 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 Tre

Re: generateTreeList starting from an id

2012-03-15 Thread Ernesto
hing 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 scri

generateTreeList starting from an id

2012-03-15 Thread Ernesto
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? -- Our newest site fo

Re: Retrieve extra field with generatetreelist

2011-10-23 Thread #2Will
You can speficy the field to use as the value, but i think only one field havn't tried though... $tasks = $this->Category->generateTreeList(null, null, '{n}.Category.status', "-"); you could make a combinded field in the model. What i have done in the past is ord

Re: Retrieve extra field with generatetreelist

2011-10-23 Thread MetZ
Hi... Sooo.. no suggestions? $categories = $this->Category->generatetreelist(null, null, null, '|-- ', $recursive = -1 ); Looking to retrieve the extra field "Category.published" and display it in my html table. Should I use another find and merge them or some

Re: Pagination generatetreelist results

2011-10-19 Thread Constantin.FF
way to do this. If I get the generatetreelist the results are not ordered the way I need but just ordered by ID and also not paginated. And if I try to display the posts results , I can sort them only by one criteria and I need them sorted by parent_id and sort number while keeping them groped by

Re: Retrieve extra field with generatetreelist

2011-10-19 Thread Dee Johnson
http://book.cakephp.org/view/1348/generatetreelist I have not used generaltreelist personally but based on the docs above it seems that it works just like 'find' and if you have your relationships set up correctly and you set the recursive attribute to bring back the appropriat

Retrieve extra field with generatetreelist

2011-10-19 Thread MetZ
Hi all. I am wondering how I can retrieve an extra field from my rows using generatetreelist? $this->data = $this->Category->generatetreelist(null, null, null, '   '); The field I am looking for is "status", to display if the category is active or not. And,, btw.. I

Pagination generatetreelist results

2011-10-19 Thread Constantin.FF
I need to paginate the results of generatetreelist together with the Posts results. Already I have $this->paginate('Post' ); but also I need the treelist of the posts. I can do this by if check before the display of posts in the view or merging the arrays in the controller but

Re: Any Solution to Order a generatetreelist output

2011-04-16 Thread Nic
//cakephp.1045679.n5.nabble.com/Any-Solution-to-Order-a-generatetreelist-output-tp4308116p4308453.html Sent from the CakePHP mailing list archive at Nabble.com. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp

Re: Any Solution to Order a generatetreelist output

2011-04-16 Thread Yuka Poppe
trying to display category list inside >> select box. I am using Tree List, so what I have in my table is: >> |  id  |  category  |  parent_id  | >> Currently I am using generatetreelist() that generates a good >> hierarchy of categories, but these are not in proper order. >&g

Re: Any Solution to Order a generatetreelist output

2011-04-16 Thread Tilen Majerle
for being of great > support. > Guys, as in my project I was trying to display category list inside > select box. I am using Tree List, so what I have in my table is: > | id | category | parent_id | > Currently I am using generatetreelist() that generates a good > hierarchy o

Any Solution to Order a generatetreelist output

2011-04-16 Thread Mr.Jayesh
Hi Mates, First off all, I would like to thank this group for being of great support. Guys, as in my project I was trying to display category list inside select box. I am using Tree List, so what I have in my table is: | id | category | parent_id | Currently I am using generatetreelist

Re: actAs "Tree" : generatetreelist error

2011-01-29 Thread Jeremy Burns | Class Outfit
r: 1064: You have an error in your SQL syntax; > check the manual that corresponds to your MySQL server version for the > right syntax to use near 'generatetreelist' at line 1 > Query: generatetreelist > > I debugged and found that cakePHP does not understand the method &

Re: actAs "Tree" : generatetreelist error

2011-01-29 Thread Tilen Majerle
or in your SQL syntax; > check the manual that corresponds to your MySQL server version for the > right syntax to use near 'generatetreelist' at line 1 > Query: generatetreelist > > I debugged and found that cakePHP does not understand the method > generatetreelist() >

actAs "Tree" : generatetreelist error

2011-01-29 Thread raymond
Hi. I have tried Tree behavior just according to manual, but it reports error following: Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'generatetreelist' at li

Re: Want generatetreelist() results in alphabetical order

2010-11-26 Thread Johnny Cupcake
On Nov 22, 1:09 am, AD7six wrote: > > I'd recommend looking at the reorder method, which'll do what you want > to the data itself, unless you're wanting to sort by a different > field. > > http://api.cakephp.org/view_source/tree-behavior/#l-628 Thanks, reorder() was in fact the first thing I tri

Re: Want generatetreelist() results in alphabetical order

2010-11-22 Thread AD7six
On Nov 22, 3:55 am, Johnny Cupcake wrote: > OK, I decided to bake up a solution myself.  I don't contend that it > is the fastest or the best, but it is simple and it seems to work. Since MPTT doesn't care about sibling order, getting the "wrong" result from genera

Re: Want generatetreelist() results in alphabetical order

2010-11-21 Thread Johnny Cupcake
list, wherein all items // are ordered as a tree. Unlike generatetreelist() (as of Cake 1.3), peers in this // list are also ordered (however they were by the preceding find() ). // This is meant to be used in models with Tree behavior. //

Want generatetreelist() results in alphabetical order

2010-11-21 Thread Johnny Cupcake
http://book.cakephp.org/view/1348/generatetreelist generatetreelist() returns a pseudo-tree in a relative order, with children under parents. I would like results wherein the peers are also ordered, alphabetically by label. Here is a quick example if this isn't clear: array( [1] =&

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Yes, that would work too. Thanks :) (for some reason this message didn't get posted earlier) On 30 jul, 13:55, Jon Bennett wrote: > you could use getpath, eg: > > count($this->Model->getpath($id, array('id'))); > > hth > > Jon Check out the new CakePHP Questions site http://cakeqs.org and help

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Yes, that would work too. Thanks :) On 30 jul, 13:55, Jon Bennett wrote: > you could use getpath, eg: > > count($this->Model->getpath($id, array('id'))); > > hth > > Jon > > On 30 July 2010 12:45, Tomatosoup wrote: > > > > > > > Hello, > > > Does anybody know of a function likegeneratetreelistth

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Thanks :) I'll look into that. On 30 jul, 14:28, cricket wrote: > On Fri, Jul 30, 2010 at 7:45 AM, Tomatosoup > wrote: > > Hello, > > > Does anybody know of a function likegeneratetreelistthat seperates > > the depth from the value. Instead of counting the spacer chars. > > > I saw an SQL quer

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread cricket
On Fri, Jul 30, 2010 at 7:45 AM, Tomatosoup wrote: > Hello, > > Does anybody know of a function like generatetreelist that seperates > the depth from the value. Instead of counting the spacer chars. > > I saw an SQL query in the explanation page of MySQL. > It's this pag

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Jon Bennett
you could use getpath, eg: count($this->Model->getpath($id, array('id'))); hth Jon On 30 July 2010 12:45, Tomatosoup wrote: > Hello, > > Does anybody know of a function like generatetreelist that seperates > the depth from the value. Instead of counting the sp

generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Hello, Does anybody know of a function like generatetreelist that seperates the depth from the value. Instead of counting the spacer chars. I saw an SQL query in the explanation page of MySQL. It's this page: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html This is the

Re: generatetreelist, keypath, valuepath

2010-04-12 Thread dreamingmind
All right friends and neighbors. One last update I guess. I messed around some more and found the 'recursive' parameter has to be set for the string paths to operate if they point to any linked table. I'm assuming, if you don't set a recursive level for the find, the value is defaulting to suppress

Re: generatetreelist, keypath, valuepath

2010-04-12 Thread dreamingmind
What I've seen is altering the final line of the generatetreelist() method from: return Set::combine($results, $keyPath, $valuePath); to return Set::combine($results); allows the string path parameters to work. ?? What's up here? Don Check out the new CakePHP Questions

generatetreelist, keypath, valuepath

2010-04-11 Thread dreamingmind
[parent_id] => 45 [lft] => 120 ... I'm expecting this: $this->Navigator->generatetreelist(null, null, "{n}.Navline.name", '  ') or $this->Navigator->generatetreelist(null, "{n}.Navigator.id", "{n}.Navline.name"

Re: generatetreelist and conditions

2009-06-03 Thread brian
On Wed, Jun 3, 2009 at 8:20 AM, Toutankharton wrote: > > Hey everyone, > > I'm trying to select all of my projects belonging to a client, but I > fail to use generatetreelist and conditions. > > I tried : > > $this->Project->generatetreelist(null, array(&#x

generatetreelist and conditions

2009-06-03 Thread Toutankharton
Hey everyone, I'm trying to select all of my projects belonging to a client, but I fail to use generatetreelist and conditions. I tried : $this->Project->generatetreelist(null, array('Project.client_id' => '3'), null, null, '...'); since the second

Re: generatetreelist error in rc4

2008-12-24 Thread AD7six
"Undefined property: AppModel::$TicketCategory" means your TicketCategory model doesn't exist or isn't being found - and so an instance of AppModel is used instead (since the db table does exist). AD --~--~-~--~~~---~--~~ You received this message because you are

Re: generatetreelist error in rc4

2008-12-23 Thread Nate
cake dir to the rc4 version and this happens: > > my $conditions are defined before this line... > line: 326 > $this->UserTicketAlert->TicketCategory->generatetreelist(array > ($conditions),null, null, '')); > > I moved to rc4 and I am getting: &g

generatetreelist error in rc4

2008-12-23 Thread korcan
I have this line of code in my project that works in RC3, changed the cake dir to the rc4 version and this happens: my $conditions are defined before this line... line: 326 $this->UserTicketAlert->TicketCategory->generatetreelist(array ($conditions),null, null, '')); I mo

combinate generateTreeList and paginate

2008-09-27 Thread cyberscorp
Hi, How can i generate a tree list with a pagination ? Is there any combination between $this->paginate('Category') and $this- >Category->generatetreelist(null, null, null, '--') Thank you. Model : class Category extends AppModel { var $name = "Cat

Re: generatetreelist()

2008-08-24 Thread validkeys
if($this->Category->save($data)){ exit; } I don't believe this is deprecated or is it? On Aug 23, 12:56 pm, Abrar <[EMAIL PROTECTED]> wrote: > hi , here im trying to use generatetreelist() first time,  so

generatetreelist()

2008-08-23 Thread Abrar
hi , here im trying to use generatetreelist() first time, so whats problem im facing is that it saves the data two times with once execution of code. here is my code that im using function addData($fieldName = null, $pa_id = null){ $existance = $this->Categ

RE: problem using TreeBehavior generateTreeList function...

2008-03-25 Thread phpcurious
my controller's code: -- categories->generatetreelist($this- >categories,"categories.id ASC",NULL,"{n}categories.id","{n}categories.description"); pr($treelist); } } ?> ---

generatetreelist

2008-02-25 Thread Mech7
Does anybody have any examples on how to use this function? I only get a flat list back always? --~--~-~--~~~---~--~~ 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@googlegro