John David Anderson (_psychic_) wrote:
> You might look at using an element or using requestAction to do that.

I'm confused about how exactly requestAction works. Here's a snippet of
my DocsController:

function getList()
{
  $this->set('doclist', $this->Doc->generateList(null, 'weight desc',
null, '{n}.Doc.id', '{n}.Doc.name'));
}

So, from inside default.thtml do I simply use
$this->requestAction('/docs/getList') and then I have $doclist to use
or do I have to do something like $doclist =
$this->requestAction('/docs/getList')? Also, how does
views/docs/doclist.thtml work in all of this?

Another thing that I'm totally confused about are elements. What does
$this->element() and $this->renderElement() do? If I use
$this->renderElement('doclist') in layouts/default.thml what needs to
be in views/elements/doclist.thtml?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to