> > 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:
>
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
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:
>
:
> 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
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
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
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
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
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
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
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
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
//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
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
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
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
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
&
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()
>
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
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
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
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.
//
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] =&
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
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
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
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
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
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
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
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
[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"
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(
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
"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
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
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
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
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
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
my controller's code:
--
categories->generatetreelist($this-
>categories,"categories.id
ASC",NULL,"{n}categories.id","{n}categories.description");
pr($treelist);
}
}
?>
---
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
42 matches
Mail list logo