•  
  •  
  •  
  •  
  •  
  •  
  •  
Username:
Password:
Forgot password?  Register

Extending ViewRenderer to Support Layout Templates

Title: Extending ViewRenderer to Support Layout Templates
Category: Zend Controller & Zend View
Clicks: 842
Listing added: Jun 18, 2007
PageRank:
Not available
Contrary to what my tutorial says, I'm one of those people that doesn't want to have to render my common header and footer templates in every single view script file. I prefer a standard site-wide layout script file that will display the content of the action script files within it. The Zend_Controller_Action_Helper_ViewRenderer action helper is a great bit of code that automates rendering a view template based on which action has been called. This is very useful, but renders the action template, not my layout template. To solve this, I am experimenting with extending the Zend_Controller_Action_Helper_ViewRenderer and overriding it so that it know about my layout template. I also prefer to use the view suffix "tpl.php" for my view scripts, so I've made my class automatically set my preferred view suffix.
Zend Framework Version: 1.0 RC1
Author Name: Rob Allen
Source: Akra’s DevNotes
Referred By: Zend Framework Tutorials
Rating
  •  

Rating: 9.33/10 (3 ) 

Comments
Comment Author ronnystalker / Jul 26, 2007
This article seems to have been moved to: http://akrabat.com/2007/06/02/extending-viewrenderer-for-layouts/

 

 


 characters left

captchaPlease input letters you see on the image.
Click on image to redraw.