Page 322 of 211,266, showing 20 records out of 4,225,309 total, starting on record 6,421, ending on 6,440
# | Username | Text | |
---|---|---|---|
# | Aug 8th 2008, 22:58 | markstory | just make sure you cache the element. |
# | Aug 8th 2008, 22:58 | freebox | $categorias = NULL |
# | Aug 8th 2008, 22:58 | markstory | requestAction('/categorias/index'); |
# | Aug 8th 2008, 22:58 | markstory | the first slash is important. |
# | Aug 8th 2008, 22:59 | freebox | uhm |
# | 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 | dammit, if i go to localhost/app/categorias/index/sort:nome/order:asc |
# | Aug 8th 2008, 22:59 | freebox | this work fine |
# | Aug 8th 2008, 23:00 | markstory | requestAction returns text I bet. |
# | Aug 8th 2008, 23:01 | freebox | no |
# | Aug 8th 2008, 23:01 | freebox | i'm doing die($categoria); to test |
# | Aug 8th 2008, 23:01 | markstory | I honestly almost never use requestAction. |
# | Aug 8th 2008, 23:01 | freebox | and nothing appears |
# | Aug 8th 2008, 23:01 | freebox | markstory: what i can use to it? |
# | Aug 8th 2008, 23:02 | markstory | I put functions into models, and then make elements that can render those functions |
# | Aug 8th 2008, 23:02 | freebox | uhm |
# | Aug 8th 2008, 23:02 | markstory | so in controller: $this->set('categories', $this->category->find('all')); |
# | Aug 8th 2008, 23:03 | markstory | make a categories element. |
# | Aug 8th 2008, 23:03 | markstory | in view: echo $this->element('categories', compact('categories')); |
# | Aug 8th 2008, 23:05 | freebox | ok, i'll test |