2009年2月23日星期一

[fw-mvc] Commons view helpers for every modules of an application

Hi there,

I have a little design question as I want to be the most "Zend Framework
compliant" as possible in my application design.

I have three modules, and both uses the same view helpers. If I put my
helpers in default/views/helpers/, it works perfectly for the default
module, but I must use a
$this->view->addHelper('document_root/../application/default/views/helpers/)
in my others modules' init method (wich is not really complex, as all my
modules controller inherit from an abstract one, inheriting themselves
from a much global one for all the application).

Is there a best practice, or, at least, a more common way to do for such
a configuration (Custom view class, Front plugin...) ? So many way, so
hard to choose one ;)

Thanks,
Lucas

没有评论: