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
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
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
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
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
:
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
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
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
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
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
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
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
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
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
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
.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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
)){
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
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
my controller's code:
--
?php
class CategoriesController extends AppController {
var $name = Categories;
var $uses = array(categories);
function listcat() {
$treelist = $this-categories-generatetreelist($this-
categories
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
42 matches
Mail list logo