Thanks for your help, John, I got it working. Here's what I did:
controllers/docs_controller.php:
function getList()
{
$this->set('doclist', $this->Doc->generateList(...);
}
views/docs/get_list.php:
[echo $doclist using foreach]
views/layouts/default.thtml:
echo $this->requestAction('/docs/getList', array('return'));
This means that my html and stuff is stored in views/docs/get_list.php
which works but I'd much rather have the html stored in
views/layouts/default.thtml. How can I use $this->requestAction to
return a variable instead?
I looked in the API for renderElement and it makes sense. I think I
would use renderElement for things like banner ads and things like
that. Since I'm doing this for my primary navigation I think
requestAction would be more suitable. Let me know if I'm wrong about
that.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---