Re: Simple Ajax issue

2008-04-23 Thread Neveldo

Thank Axel, this is what I'm looking for !
In fact, I need for one action an normal view and an ajax view !

thank !
Cordially,
Neveldo : http://www.neveldo.fr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Simple Ajax issue

2008-04-23 Thread Axel Ariel Arroyo Braconi
if you need use a view of the same controller try with:

$this->render('name_of_view');

but remember only if you need use a view of the controller if you want
render a element or a view in of other controller try this

$this->viewPath = 'route_of_view_folder';
$this->render('name_of_view');

ex:
$this->viewPath = 'elements'.DS.'header';
$this->render('navigation);

or

$this->viewPath = 'posts';
$this->render('comment');


On 4/23/08, Neveldo <[EMAIL PROTECTED]> wrote:
>
>
> ... but I've now another problem :p
>
> Is it possible to load a view which is not the default view of the
> action ?
>
> I try by using $this->view or $this->load->view,  but it seems to
> doesn't work :(
>
> thank !
>
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Simple Ajax issue

2008-04-23 Thread Neveldo

... but I've now another problem :p

Is it possible to load a view which is not the default view of the
action ?

I try by using $this->view or $this->load->view,  but it seems to
doesn't work :(

thank !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Simple Ajax issue

2008-04-23 Thread Neveldo

Ok, I'm sorry ... I just found the $this->params['requested'] method
which make what I want :)

Codially,
Neveldo : http://www.neveldo.fr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Simple Ajax issue

2008-04-23 Thread Neveldo

Hi all,

I'm trying myself with some ajax ...

My problem is simple : I want to insert in a page the rendered view of
an action (which contain an ajax pagination). To do that, I use
requestAction() method. Right now, it works fine.

But I want to use a different layout for the action if it is an ajax
request. How can I do that ?

Using $this->RequestHandler->isAjax()  doesn't let me know if the
action was requested normally or by requestAction() !

Thank a lot !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---