What you want is to set the $this->autoLayout = true  for the target
controller.  You can't do this where you are calling the requestAction
though, it needs to be in the execution of the target
controller/action.

The way I've done this (I email the final output), is to put:

$Route->connect('/email/:controller/:action/*', array('email' => '1'));

in my app/config/routes.php (so, anything prefixed with /email/ will
set a variable, but work as normal).  And then, in my
app/app_controller.php I have:

function beforeFilter()
{
        if ( @$this->params['email'] == '1' ){
                $this->autoLayout = true;
                ...
        }
}

So that I can easily prefix any controller/action with /email/, and the
output is suitable for emailing (links become absolute rather than
relative, css is inlined etc).


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