Suppose you want to show the latest blog at home page. First you should
finish the independent action "getLatestBlog" of the Controller
"blogs". Then adding following codes in your
"app/controllers/pages_controller.php":
$latestBlog= $this->requestAction('/blogs/getLatestBlog',
array('return'));/*call externally*/
$this->set('newBlog', $latestBlog);/*set variable for View*/
Then in your "app/views/pages/home.thtml", show it:
<?php pr($newBlog); ?>
Hope it helps. I tested it before posting here. ^O^
Henry
mschwer wrote:
> Is it possible to get SQL results in the app/views/pages/home.thtml
> page?
>
> And if it's possible How to do it.
>
> greetz
> Michael
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---