Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-01-2008, 03:17 AM
Junior Member
 
Join Date: Mar 2008
Posts: 6
Exclamation Rendering views

Hello while using view's render method, it gives the phtml files read and its ouput. How can i use a file with php or html extension as the template file, WHen i tried to render like this ($view->render('index.php')) ,, it gave me some error. Pls help me>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-01-2008, 06:00 AM
Junior Member
 
Join Date: Mar 2008
Location: BC
Posts: 6
Default

It would be nice if you posted what the error was.

Without that, I would suggest you have set up your path for view?

Code:
 $view = new Zend_View();
 $view->setScriptPath('/path/to/view/files');
 $view->render('index.php');
If you haven't set the path it'll give you an error about no view script directory set. If you haven't set it it will look in the current directory for the requested render file.

It's all in the manual: Zend_View Controllers Scripts
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-01-2008, 11:36 AM
Junior Member
 
Join Date: Mar 2008
Posts: 6
Angry Layouts

Iam using layout utility of Zend 1.5. SO i have started MvcArchitecture().


SO in controller view helper renders the action view file. And the content is added to the template layout in Layouts folder. SO while i use the $this->view->render('index'), the index.phtml is embedded in to the layout file. WHen i tried render('index.phtml') it shows error as script not found in path. i Also set the script path for the views...

??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:44 PM.