No, as mentioned if you just have the RequestHandler component
included in your controller, it will use the Ajax layout when you make
an ajax call.
The problem is that Michael is not making an ajax call - he is simply
calling render() from the view file - which of course is still php and
server
if ($this-RequestHandler-isAjax()){
$this-render('edit','ajax');
}
if your action are called by ajax, the view will be rendered with the
layout ajax
Titang
On 10 May, 02:58, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Sliv wrote:
http://manual.cakephp.org/chapter/request_handler
yeah
How to render the same file from controller and view.
For example I need to render edit.thtml.
Inside controller I do
$this-render('edit', 'ajax');
and it works.
From view I do $this-render('edit', 'ajax'); and does not work, the
ajax links inside the edit.thtml file are not working.
My layout
use the RequestHandler component with ajax and the layout will be set
automatically
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To
gwoo wrote:
use the RequestHandler component with ajax and the layout will be set
automatically
Not sure how to use it .
I added inside controller
var $components = array('RequestHandler');
so from view
I use
$this-render('edit');
which give still me double layout
from controller
the
http://manual.cakephp.org/chapter/request_handler
On May 9, 1:14 pm, Michael Augustyniak [EMAIL PROTECTED]
wrote:
gwoo wrote:
use the RequestHandler component with ajax and the layout will be set
automatically
Not sure how to use it .
I added inside controller
var $components =
Sliv wrote:
http://manual.cakephp.org/chapter/request_handler
yeah thanks, but there is no sample in my case w
my code
controller Email
var $components = array('RequestHandler');
function index()
{
$this-RequestHandler-setAjax($this);
}
function edit()
{