Hi All,
I'm trying to gather data from 2 different models (2 different tables)
and I want to place them on my layout.
I read something about using a requestAction so I did the following:
function index()
{
$this->set('archives', $this->Archive->findAll());
$this->set('posts', $this->requestAction('/posts/index'));
}
so on my layout I have
<?php foreach ($archives as $archive): ?>
<input type="textbox" name="setting1" value="<?php echo
$archive['archive']['user']; ?>"/>
<?php endforeach; ?>
<?php foreach ($posts as $post): ?>
<input type="textbox" name="setting2" value="<?php echo $post['post']
['created']; ?>" />
<?php endforeach; ?>
the first one gets the archive user and that one works, but the second
one , which I used the table posts created on the 15 min tutorial
doesn't get the data. Can anyone tell me what I'm doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---