Hello all,
Please have a look of both links here, that represent a layout structure of a given website:
The homepage:
http://www.help.nuvemk.com/mvc_zend/home_page.png
The secondary pages:
http://www.help.nuvemk.com/mvc_zend/secondary_pages.png
Newbie here, so don’t get to complicated on me. Please. (only if you REALLY must).
I do have a lot of questions, but I believe they should be quick answered by anyone used to mvc structures and oo in general.
1) About the navigation:
1.1) Should we draw the navigation on our Layout?
1.2) Or should we repeat the code for each view?
1.3) Or a helper? If this generates to many discussion, please just advice one with restrictions.
1.3.1) If we do it on the layout, how can we have the proper
menu item highlighted if the user is on a given page ?"
2) About the pink zone:
It will have a list of latest news comming from the database.
This list of latest news will be available on ALL pages.
2.1) If we do it on the layout, is there an issue to have a controller
and a model for our layout?
2.2) Is there a third option more reliable?
About HOME and SECONDARY pages:
3) As we can see, the HOME PAGE (singular) and the Secundary Pages (plural),
are quite different on their look. How can we deal with this?
3.1) Should we have two layouts, one for the HOME PAGE and another for the
secondary pages?
3.2)
Or shouldn’t we have a layout for the home page at all,
since it’s a solo page, hence, a view will sufice?
4) About the majority of examples seen:
On the secondary pages, I believe we can’t simply have a layout with a header and a footer, and between them, have:
<?php echo $this->layout()->content; ?>
Like so many examples out there. Not just that.
Between the header and the footer we have not only our view specific stuff, but we also have a pink box that will be equal on every page, and a navigation that it’s between them as well.
4.1) I’m wondering if we can have:
<?php echo $this->layout()->content; ?>
but also:
<?php echo $this->layout()->bigheadings; ?>
Kind Regards,
Márcio