2010年11月22日星期一

Re: [fw-mvc] Zend_View directory layout

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well here's a question I haven't seen answered yet (though maybe I've
overlooked it): is there a recommended templating engine for Zend
Framework?

On 11/22/2010 10:37 AM, Hector Virgen wrote:
> If possible I suggest using CSS to apply the themes. Otherwise you'll need
> to create multiple versions of the same view and that can quickly become
> tedious.
>
> But if your themes require custom markup per view script, then using
> $view->setScriptPath() will work fine. Just be sure to set it early like in
> a preDispatch hook or, at latest, within the action method's body.
>
> --
> *Hector Virgen*
> Sr. Web Developer
> http://www.virgentech.com
>
>
>
> On Mon, Nov 22, 2010 at 7:31 AM, <aurelijus@astdev.lt> wrote:
>
>> It's not really hard.
>> You can do it in your controller plugin or even bootstrap, just set
>> view script path depending on user (or other) preferences
>> $viewInstance->setScriptPath(THEME_PATH);
>>
>>
>>
>> On Mon, Nov 22, 2010 at 5:26 PM, Pablo Morales <pablofmorales@gmail.com>
>> wrote:
>>> This is so hard.
>>>
>>> If you have different themes, the best way is the theme adapt your views
>> to
>>> layout, not the inverse.
>>>
>>> The logic in the views, is the same, only change some divs, or other html
>>> parameters. You need work with your layout, not with your views files
>>>
>>>
>>>
>>> On 11/22/2010 12:14 PM, Maxim Savenko wrote:
>>>>
>>>> I'd like to slightly change the layout of base Zend_View directory
>>>> layout.
>>>> The current layout is as follows:
>>>>
>>>> view
>>>> filters
>>>> helpers
>>>> scripts
>>>>
>>>> ... and I'd like to split script directory to several
>> directories(themes),
>>>> depending on a theme user will choose.
>>>> For example:
>>>>
>>>> view
>>>> filters
>>>> helpers
>>>> scripts
>>>> default
>>>> modern
>>>> classic
>>>>
>>>> What is the best way to shoot the bull?
>>>>
>>>> Thank you,
>>>> Maxim Savenko
>>>> maxim.savenko@gmail.com
>>>>
>>>
>>>
>>
>>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzrJxQACgkQ3XeSMIaeNkk5QgCfebHoKX7+V//iFd9Sm7+T65bc
7LUAoIcZMOyjXPWgR9UhjaOQLY4PXuGA
=tnVB
-----END PGP SIGNATURE-----

没有评论: