2010年12月19日星期日

[fw-mvc] RE : [fw-mvc] Multiple layouts

That's for include a view in another, but it's not what I want.

See: I've a module named "User" with a layout. Then I have a controller "Index" that just print informations about the user.
Now, I want to have a controller "Account" with some views but also with common html parts. I can use a specific layout for the Account controller BUT I'll have the header and the footer in the both layouts: if I want to change one, I'll have to change it into the both, that isn't really good...

So, is it possible to have two layouts:
- The first principal layout ("layout1.phml")
- Then, at the place of the view in "layout1.phtml" the layout "layout2.phtml"
- At the place of the view in "layout2", the view.

Regards,
Samuel.
________________________________________
De : Marek Jarosz [marjarosz@gmail.com]
Date d'envoi : dimanche 19 décembre 2010 16:04
À : ROZE Samuel
Objet : Re: [fw-mvc] Multiple layouts

W dniu 2010-12-19 14:50, ROZE Samuel pisze:

Hello,

I'm using Zend Framework 1.11 and I've a little question.

I have a layout named "layout.phtml" that contains my header/footer and head-menu. The view is included into.
It's perfect but now I've an "Account" controller that requires another layout (vertical menu, ...).

Is it possible to include an other layout at the place of the view in the first layout and then include the view in the 2nd layout? Or have I to create an other layout with header/footer and the account menu?

Thanks in advance!
Regards,
Samuel ROZE.

<?php echo<http://www.php.net/echo> $this->partial('partial.phtml', array<http://www.php.net/array>('params'=>'params')); ?>

没有评论: