You are here: cakephp rendering « PHP Language « IT news, forums, messages
cakephp rendering

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация