Themselves wrote:
> 
> Hi guys,
> 
> I have a number of view scripts that are cut and paste across almost all
> of
> my view directories, basically templates that hold code to load a
> structural
> html / tabs / etc. These files are almost all  identical, so there is a
> very
> obvious case for removing these duplications, along with providing an
> "override" system if and when that particular action requires custom code.
> I've seen this page here:
> http://joshribakoff.com/2009/02/overridable-view-scripts-in-zend-framework/-
> and it does exactly what I want, but it also seems a little bit
> curious
> having to duplicate code across all of my actions / controllers in order
> to
> remove some duplicate code. Is there a better way of doing this?
> 
> 
I would use here custom made view
helpers(http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.custom)
and for more pure html code can be done with
partials(http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.partial)

-- 
View this message in context: 
http://www.nabble.com/reusing-view-scripts-across-controllers.-tp23956441p23957061.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to