logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: ViewRenderer Problems: msg#00476

Subject: Re: ViewRenderer Problems
Pat,
 
I've been trying to make heads or tails of this change for a couple days now. The solution seems to be to use a postDispatch plugin or to disable the view renderer.
 
Seems like a % of developers think about templates as a series of concatenated strings (header.tpl, content.tpl, footer.tpl) and others (like you+me) think about them as a series of containers. The viewrenderer somewhat presumes the former, but with a plugin can do the latter.
 
I'll post when i've got a full plugin example working.
 
Kevin
----- Original Message -----
From: pat
Sent: Wednesday, May 30, 2007 12:42 PM
Subject: [fw-general] ViewRenderer Problems

When I upgraded to the conventional modular structure,  I started factoring as much controller code as I could, into a subdirectory named after the controller.
Like this

/testing/page/show                                       // module=testing , page=controller, show= action
          /page/page_utilities.php                     // contains utility functions for page controller
          /page/page_show_form.php              // contains form for the show action of the page controller


the controller could access the utility functions using:
require_once 'page/page_utilities.php';

The idea behind this was that I could them move a controller to another directory by moving the controller and the corresponding subdir.  I tried to reduce link-rot in the utility files by making them 'modular aware'

My templates are in the view directory.

app/controllers
       etc/
       views/
std_1_col.php                  // template
      
views/std_3_col.php                  //template
       views/modules/blurbBox.php     // a php that returns html

In my actions I would do this:

$view->right_content = $view->render('modules/blurbBox.php');
echo $view->render('std_3_col.php');


Now I can't seem to find the the template std_3_col.php. instead, I get the following.
Warning
: Zend_View::include(../private/app/views/) [

The above is the path to my views dir.


I would appreciate any help.

cheers.



pat




<Prev in Thread] Current Thread [Next in Thread>