Well some prefer to have common header and footer templates in every
singe view file , others use standard site-view layout file that
displays the content of the action script files.
Let's assume you have 5 modules (default, employer, jobseeker, forum ,
...) and in every one of them about 10 site-view templates (different
colors, 2-3 column layouts for user to choose, ...) You have to add in
HTML head section some javascript code and css styles and right before
</body> tag Javascript tracking code.
In first aproach you'll have to edit just 2 files -
'default/index/header.tpl' and 'default/index/footer.tpl' (maybe some
other). In second approach there are about 50 files to edit ...
Best solution is in my opinion to combine this two approaches and have
"ultimate" Zend_Layout!
AlesL
Kevin McArthur wrote:
> This is _exactly_ the type of use Layout is designed to discourage.
> See the -general debate.
>
> Patience, your original approach is correct. Wait for layout.
>
> K
> ----- Original Message ----- From: "Ralf Eggert" <
[hidden email]>
> To: "Zend Framework MVC" <
[hidden email]>
> Sent: Saturday, June 02, 2007 2:04 PM
> Subject: Re: [fw-mvc] ViewRenderer and Smarty
>
>
>> Hi Ales,
>>
>> thanks for your reply.
>>
>>> index.tpl:
>>> <body>
>>> {include file=’default/index/header.tpl’}
>>> <div id="content">
>>> Lorem Ipsum
>>> </div>
>>> {include file=’default/index/footer.tpl’}
>>> </body>
>>
>> So, if I understand this correctly, this approach would mean that I need
>> to add the inclusion of my header and footer template to all of my
>> templates. At the moment I rather prefer my solution if it is possible
>> to use it with the ViewRenderer without any big hassle.
>>
>> Thanks anyway and Best Regards,
>>
>> Ralf
>