# |
Oct 22nd 2009, 12:41 |
dogmatic69 |
zyro: you want the child name? |
# |
Oct 22nd 2009, 12:40 |
zyro |
this time binned if it helps: http://bin.cakephp.org/view/665069352 ... |
# |
Oct 22nd 2009, 12:39 |
dogmatic69 |
sup alan|macbook |
# |
Oct 22nd 2009, 12:37 |
alan|macbook |
yop dogmatic69 |
# |
Oct 22nd 2009, 12:36 |
dogmatic69 |
hey chan, hows every one :) |
# |
Oct 22nd 2009, 12:34 |
zyro |
sry for that one |
# |
Oct 22nd 2009, 12:34 |
alkemann |
missing a paste bin for one |
# |
Oct 22nd 2009, 12:33 |
zyro |
--> whats wrong here? am i missing sth? result should be parent2 imho... |
# |
Oct 22nd 2009, 12:33 |
zyro |
the result: Array([0] => parent1) |
# |
Oct 22nd 2009, 12:33 |
zyro |
Set::extract('/Parent/Child[child_name=child2]/../parent_name', $test) |
# |
Oct 22nd 2009, 12:33 |
zyro |
); |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:33 |
zyro |
'child_name' => 'child2' |
# |
Oct 22nd 2009, 12:33 |
zyro |
'Child' => array( |
# |
Oct 22nd 2009, 12:33 |
zyro |
'parent_name' => 'parent2', |
# |
Oct 22nd 2009, 12:33 |
zyro |
array( |
# |
Oct 22nd 2009, 12:33 |
zyro |
), |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:32 |
zyro |
'child_name' => 'child1' |
# |
Oct 22nd 2009, 12:32 |
zyro |
'Child' => array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
'parent_name' => 'parent1', |
# |
Oct 22nd 2009, 12:32 |
zyro |
array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
'Parent' => array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
$test = array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
lo people.. just hit a problem with Set::extract ... maybe someone can provide help: |
# |
Oct 22nd 2009, 12:31 |
alan|macbook |
$programmes = $this->Programme->find('list'); gives a list of checkboxes |
# |
Oct 22nd 2009, 12:31 |
alan|macbook |
ok. You are right about flat data arrays |
# |
Oct 22nd 2009, 12:30 |
alan|macbook |
right |
# |
Oct 22nd 2009, 12:28 |
teknoid |
alan|macbook: but i certainly cannot guess what you mean by "things you don't understand" ... because i can't even see them |
# |
Oct 22nd 2009, 12:28 |
teknoid |
alan|macbook: like i said i am not sure if it's going to automagically build a tree structure for you. it works well for "flatter" data arrays |
# |
Oct 22nd 2009, 12:27 |
alan|macbook |
where is my mistake ? |
# |
Oct 22nd 2009, 12:27 |
alan|macbook |
teknoid: ok... it's displaying things i don't understant... I guess it comes from the 'options' => $programmes wich is set by $programmes = $this->Programme->find('all',array('fields' => array('title', 'lft', 'rght'), 'order' => 'lft ASC')); |
# |
Oct 22nd 2009, 12:22 |
alan|macbook |
Batuchi : maybe... |
# |
Oct 22nd 2009, 12:22 |
Batuchi |
alan|macbook, dont u need ajax helper for that? |
# |
Oct 22nd 2009, 12:20 |
alan|macbook |
Batuchi : see http://crepitus.com/misc/ext/tree.html |
# |
Oct 22nd 2009, 12:19 |
Batuchi |
a tree of checkboxes? |
# |
Oct 22nd 2009, 12:18 |
alan|macbook |
dam it ! |
# |
Oct 22nd 2009, 12:18 |
teknoid |
alan|macbook: possibly the options.... to be used |
# |
Oct 22nd 2009, 12:17 |
alan|macbook |
morning Batuchi |