Re: generateTreeList starting from an id

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

Re: actAs Tree : generatetreelist error

2012-07-03 Thread Davor Ilic
goog to know thank you 2012/6/18 Ish ish1...@gmail.com 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

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: Warning (512): SQL

Re: generateTreeList starting from an id

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

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

Re: generateTreeList starting from an id

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

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 something? Using this in view: table

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 order by lft to get the records

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 is there more simple

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, 'nbsp;nbsp;nbsp;'); The field I am looking for is status, to display if the category is active or not. And,, btw.. I am using

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 appropriate data you

Re: Pagination generatetreelist results

2011-10-19 Thread Constantin.FF
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 parent_id

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: Any Solution to Order a generatetreelist output

2011-04-16 Thread Tilen Majerle
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 of categories, but these are not in proper

Re: Any Solution to Order a generatetreelist output

2011-04-16 Thread Yuka Poppe
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. I mean, I wanted to order it according to category field. I tried many ways but didn't got the result, even later got

Re: Any Solution to Order a generatetreelist output

2011-04-16 Thread Nic
.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.org and help others

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 line 1 Query

Re: actAs Tree : generatetreelist error

2011-01-29 Thread Tilen Majerle
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() I have created table 'lkp_itemcate' with following

Re: actAs Tree : generatetreelist error

2011-01-29 Thread Jeremy Burns | Class Outfit
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() I have created table 'lkp_itemcate

Re: Want generatetreelist() results in alphabetical order

2010-11-26 Thread Johnny Cupcake
On Nov 22, 1:09 am, AD7six andydawso...@gmail.com 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

Re: Want generatetreelist() results in alphabetical order

2010-11-22 Thread AD7six
On Nov 22, 3:55 am, Johnny Cupcake sparklew...@hotmail.com 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 generatetreelist

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] = My

Re: Want generatetreelist() results in alphabetical order

2010-11-21 Thread Johnny Cupcake
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. // // Inputs: // $find_results

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 query

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 wiegersteenhui...@gmail.com wrote: Hello, Does anybody know of a function like generatetreelist that seperates the depth from the value. Instead of counting the spacer chars

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread cricket
On Fri, Jul 30, 2010 at 7:45 AM, Tomatosoup wiegersteenhui...@gmail.com 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 page

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Thanks :) I'll look into that. On 30 jul, 14:28, cricket zijn.digi...@gmail.com wrote: On Fri, Jul 30, 2010 at 7:45 AM, Tomatosoup wiegersteenhui...@gmail.com wrote: Hello, Does anybody know of a function likegeneratetreelistthat seperates the depth from the value. Instead of counting

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 jmbenn...@gmail.com wrote: you could use getpath, eg: count($this-Model-getpath($id, array('id'))); hth Jon On 30 July 2010 12:45, Tomatosoup wiegersteenhui...@gmail.com wrote: Hello, Does anybody know of a

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 jmbenn...@gmail.com wrote: you could use getpath, eg: count($this-Model-getpath($id, array('id'))); hth Jon Check out the new CakePHP Questions site

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 site http

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

generatetreelist, keypath, valuepath

2010-04-11 Thread dreamingmind
this: $this-Navigator-generatetreelist(null, null, {n}.Navline.name, 'nbsp;nbsp;') or $this-Navigator-generatetreelist(null, {n}.Navigator.id, {n}.Navline.name, 'nbsp;nbsp;') to return my tree list: ... [30] = Products [60] = Journals [68] = Gallery [83] = On the Bench

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 parameters seems to be the conditions

Re: generatetreelist and conditions

2009-06-03 Thread brian
On Wed, Jun 3, 2009 at 8:20 AM, Toutankharton toutankhar...@gmail.com 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('Project.client_id' = '3

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

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 moved to rc4 and I am

Re: generatetreelist error in rc4

2008-12-23 Thread Nate
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 moved to rc4 and I am getting: Undefined property:  AppModel::$TicketCategory [APP

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 = Category; var $actsAs = array('Tree

Re: generatetreelist()

2008-08-24 Thread validkeys
)){ 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 whats problem im facing is that it saves the data two times with once execution

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-Category

RE: problem using TreeBehavior generateTreeList function...

2008-03-25 Thread phpcurious
my controller's code: -- ?php class CategoriesController extends AppController { var $name = Categories; var $uses = array(categories); function listcat() { $treelist = $this-categories-generatetreelist($this- categories

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