Log message #112923

# At Username Text
# Aug 8th 2008, 23:26 paramS hi all, a newbie here ... just started fiddling with cakephp. I was wondering if there's an easy way to handle "Menu_System/Navigation" .. I dont want to put hard-links in "layout/default.ctp" ...
# Aug 8th 2008, 23:24 TonkaTruck generatetreelist breaks for me when any 'conditions' are present. The conditions translate fine in the sql. Error is "array_combine() expects parameter 1 to be array" Is this a bug?
# Aug 8th 2008, 23:23 Veracious markstory: thanks, I'll try that
# Aug 8th 2008, 23:23 markstory Veracious: and I think Model::save() will get them all, if not Model::saveAll() will
# Aug 8th 2008, 23:22 markstory Veracious: Model.0.field, Model.1.field etc.
# Aug 8th 2008, 23:22 freebox uhm
# Aug 8th 2008, 23:21 markstory freebox: just put the set() in the action you need the menu on.
# Aug 8th 2008, 23:21 freebox but, same thing: Warning (2): Invalid argument supplied for foreach() [APP\views\elements\menu_categorias.ctp, line 4]
# Aug 8th 2008, 23:21 freebox lol
# Aug 8th 2008, 23:21 markstory and again you forgot the / at the front :)
# Aug 8th 2008, 23:21 freebox no? uhm
# Aug 8th 2008, 23:21 freebox and $cats = NULL again
# Aug 8th 2008, 23:21 markstory you don't need to use requestAction.
# Aug 8th 2008, 23:20 freebox my element: $cats = $this->requestAction('categorias/menu');
# Aug 8th 2008, 23:20 freebox i've created in categories menu: $this->set('cats', $this->Categoria->find('all'));
# Aug 8th 2008, 23:20 markstory like?
# Aug 8th 2008, 23:20 freebox markstory: something is wrong
# Aug 8th 2008, 23:18 Veracious I'm trying to make multiple models in one form to work so I can add a row to multiple tables in one go. Any idea how to go about it? I searched about an hour on google but didn't find anything that would work
# Aug 8th 2008, 23:05 freebox ok, i'll test
# Aug 8th 2008, 23:03 markstory in view: echo $this->element('categories', compact('categories'));
# Aug 8th 2008, 23:03 markstory make a categories element.
# Aug 8th 2008, 23:02 markstory so in controller: $this->set('categories', $this->category->find('all'));
# Aug 8th 2008, 23:02 freebox uhm
# Aug 8th 2008, 23:02 markstory I put functions into models, and then make elements that can render those functions
# Aug 8th 2008, 23:01 freebox markstory: what i can use to it?
# Aug 8th 2008, 23:01 freebox and nothing appears
# Aug 8th 2008, 23:01 markstory I honestly almost never use requestAction.
# Aug 8th 2008, 23:01 freebox i'm doing die($categoria); to test
# Aug 8th 2008, 23:01 freebox no
# Aug 8th 2008, 23:00 markstory requestAction returns text I bet.
# Aug 8th 2008, 22:59 freebox this work fine
# Aug 8th 2008, 22:59 freebox dammit, if i go to localhost/app/categorias/index/sort:nome/order:asc
# Aug 8th 2008, 22:59 freebox Warning (2): Invalid argument supplied for foreach() [APP\views\elements\menu_categorias.ctp, line 3]
# Aug 8th 2008, 22:59 freebox uhm
# Aug 8th 2008, 22:58 markstory the first slash is important.
# Aug 8th 2008, 22:58 markstory requestAction('/categorias/index');
# Aug 8th 2008, 22:58 freebox $categorias = NULL
# Aug 8th 2008, 22:58 markstory just make sure you cache the element.
# Aug 8th 2008, 22:58 freebox isn't working
# Aug 8th 2008, 22:57 markstory freebox: that will work too.
# Aug 8th 2008, 22:57 freebox ?