|
Posted by misiek on 05/08/07 15:42
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 does not work. In controller set up as
var $layout= 'standard';
When I use in view $this->render('edit'); works but i have double
layout, I was trying turn off layout for edit action.
I know I can use renderElement but I can not use it from controller.
So how to render correctly a file from controller and view.
--
In RoR I use always this method for ajax, like on click render some div
and put there some file, or just if I open the page in some place I can
render the same file.
in controller render :partial => 'action'
in view render_partial 'action'
it will render for me the same file _action.rhtml
Thanks for Help
Navigation:
[Reply to this message]
|