If you mean getting the views as rendered by the controllers, or
accessing the models from outside, it's a toughie. Some of us have had
luck including models and some of the cake core files manually, but
it's a dirty stinking hack at best.

The only clean methods are to download the view as a rendered page and
display it. Either using an iframe, or ajax, or (my preferred method)
by using php's curl functions to download the rendered view within the
including page. This is worse for performance, but the only truly clean
way I've found of doing it.

My code: (in the including page)
<?
//set up a new curl session
$curl = curl_init();

// give it a publicly-accessible cake url
curl_setopt($curl, CURLOPT_URL,
"http://server/app/controller/action/params);

// may or may not need this, makes curl not print out the headers
curl_setopt($curl, CURLOPT_HEADER, 0);

// grab URL and send it straight to the browser
curl_exec($curl);

if (curl_errno($curl)) {
 //error
} else {
 curl_close($curl);
}
 ?>

I also add a GET parameter which my beforeFilter looks for, in order to
turn off layout rendering. There may be a cleaner way to do this with
cake's RequestHandler.

Anyway, hope it helps.


--~--~---------~--~----~------------~-------~--~----~
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